diff --git a/classes/inbox.class.php b/classes/inbox.class.php index 9e02637c..9a005826 100644 --- a/classes/inbox.class.php +++ b/classes/inbox.class.php @@ -5,11 +5,14 @@ class Inbox { * Get the link to a user's inbox. * This is what handles the ListUnreadPMsFirst setting * - * @param boolean - the value of $LoggedUser['ListUnreadPMsFirst'] * @param string - whether the inbox or sentbox should be loaded * @return string - the URL to a user's inbox */ - public static function get_inbox_link($ListFirst = 0, $WhichBox = 'inbox') { + public static function get_inbox_link($WhichBox = 'inbox') { + global $LoggedUser; + + $ListFirst = $LoggedUser['ListUnreadPMsFirst']; + if ($WhichBox == 'inbox') { if ($ListFirst) { $InboxURL = 'inbox.php?sort=unread'; diff --git a/classes/invite_tree.class.php b/classes/invite_tree.class.php index 0f365593..3345a7f1 100644 --- a/classes/invite_tree.class.php +++ b/classes/invite_tree.class.php @@ -215,7 +215,6 @@ function make_tree() { echo '; the total amount downloaded was '.Format::get_size($TopLevelDownload); echo '; and the total ratio is '.Format::get_ratio_html($TopLevelUpload, $TopLevelDownload).'. '; - echo 'These numbers include the stats of paranoid users and will be factored into the invitation giving script.
'; if ($ParanoidCount) { diff --git a/classes/script_start.php b/classes/script_start.php index e80e6535..afcd0725 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -357,7 +357,6 @@ // IP changed - if ($LoggedUser['IP'] != $_SERVER['REMOTE_ADDR'] && !check_perms('site_disable_ip_history')) { if (Tools::site_ban_ip($_SERVER['REMOTE_ADDR'])) { @@ -426,7 +425,6 @@ function logout() { setcookie('session', '', time() - 60 * 60 * 24 * 365, '/', '', false); if ($SessionID) { - $DB->query(" DELETE FROM users_sessions WHERE UserID='$LoggedUser[ID]' diff --git a/classes/tools.class.php b/classes/tools.class.php index e9d3edfa..469cd8b4 100644 --- a/classes/tools.class.php +++ b/classes/tools.class.php @@ -187,7 +187,6 @@ public static function disable_users($UserIDs, $AdminComment, $BanReason = 1) { } $Cache->delete_value('users_sessions_'.$UserID); - $DB->query(" DELETE FROM users_sessions WHERE UserID='$UserID'"); diff --git a/classes/user_rank.class.php b/classes/user_rank.class.php index ae6c1a2e..de76e19e 100644 --- a/classes/user_rank.class.php +++ b/classes/user_rank.class.php @@ -86,7 +86,6 @@ function table_query($TableName) { ORDER BY Posts;"; break; case 'bounty': - $Query = " SELECT SUM(rv.Bounty) AS Bounty FROM users_main AS um diff --git a/classes/users.class.php b/classes/users.class.php index 8eace908..3f20236b 100644 --- a/classes/users.class.php +++ b/classes/users.class.php @@ -51,7 +51,6 @@ public static function user_info($UserID) { if (empty($UserInfo) || empty($UserInfo['ID']) || !isset($UserInfo['Paranoia']) || empty($UserInfo['Class'])) { $OldQueryID = $DB->get_query_id(); - $DB->query(" SELECT m.ID, @@ -122,7 +121,6 @@ public static function user_heavy_info($UserID) { global $DB, $Cache; $HeavyInfo = $Cache->get_value('user_info_heavy_'.$UserID); - if (empty($HeavyInfo)) { $DB->query(" diff --git a/design/privateheader.php b/design/privateheader.php index 2c5397b0..5c0e52d0 100644 --- a/design/privateheader.php +++ b/design/privateheader.php @@ -159,7 +159,7 @@ $Cache->cache_value('subscriptions_user_new_'.$LoggedUser['ID'], $NewSubscriptions, 0); } ?>A strong password is between 8 and 40 characters long
Contains at least 1 lowercase and uppercase letter
diff --git a/sections/user/sessions.php b/sections/user/sessions.php index 6422b4c6..18d95cf8 100644 --- a/sections/user/sessions.php +++ b/sections/user/sessions.php @@ -1,6 +1,5 @@ - //TODO: restrict to viewing bellow class, username in h2 if (isset($_GET['userid']) && check_perms('users_view_ips') && check_perms('users_logout')) { if (!is_number($_GET['userid'])) { diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 4335cc80..34d20b32 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -92,8 +92,6 @@ // Get user info from the database - - $DB->query(" SELECT m.Username, @@ -242,7 +240,6 @@ } $Cache->delete_value('users_sessions_'.$UserID); - $DB->query(" DELETE FROM users_sessions WHERE UserID='$UserID'"); @@ -703,7 +700,6 @@ } $Cache->delete_value('users_sessions_'.$UserID); - $DB->query(" DELETE FROM users_sessions WHERE UserID = '$UserID'"); diff --git a/sections/user/user.php b/sections/user/user.php index 3f8f9308..642dfc73 100644 --- a/sections/user/user.php +++ b/sections/user/user.php @@ -171,7 +171,6 @@ function check_paranoia_here($Setting) { $Badges = (($Donor) ? '' : ''); - $Badges.=(($Warned!='0000-00-00 00:00:00') ? '' : ''); $Badges.=(($Enabled == '1' || $Enabled == '0' || !$Enabled) ? '' : ''); diff --git a/sections/userhistory/subscriptions.php b/sections/userhistory/subscriptions.php index a8eefa04..4c86b925 100644 --- a/sections/userhistory/subscriptions.php +++ b/sections/userhistory/subscriptions.php @@ -51,7 +51,6 @@ $sql .= ')'; if ($ShowUnread) { - $sql .= ' AND IF(l.PostID IS NULL OR (t.IsLocked = \'1\' && t.IsSticky = \'0\'), t.LastPostID, l.PostID) < t.LastPostID'; $sql .= ' OR (t.AuthorID != '.$LoggedUser['ID'].' AND l.PostID IS NULL)'; diff --git a/sections/wiki/index.php b/sections/wiki/index.php index 1f76518d..8af7cfe9 100644 --- a/sections/wiki/index.php +++ b/sections/wiki/index.php @@ -5,7 +5,6 @@ $Alias = new ALIAS; - define('INDEX_ARTICLE', '1'); diff --git a/static/functions/musicbrainz.js b/static/functions/musicbrainz.js index b8334f0a..e91b70ae 100644 --- a/static/functions/musicbrainz.js +++ b/static/functions/musicbrainz.js @@ -120,7 +120,7 @@ function showReleaseGroups(xml) { var $score = $(this).attr("ext:score"); var $releaseId = $(this).attr("id"); var $result = $artist + " - " + $title + " [Type: " + $type + ", Score: " + $score + "]" - $("" + $result + "").attr("id", $releaseId).appendTo("#results1"); + $("" + $result + "").attr("id", $releaseId).appendTo("#results1"); }); } @@ -133,9 +133,9 @@ function showReleases(xml) { $year_original = $date_release_group.substring(0,4); $release_type = $(xml).find("release-group").attr("type"); $release_group_id = $(xml).find("release-group").attr("id"); - jQuery('#popup_title').html("Choose Release " + "View on MusicBrainz"); - jQuery('#popup_back').html("Go back"); + jQuery('#popup_title').html("Choose Release " + 'View on MusicBrainz'); + jQuery('#popup_back').html('Go back'); $(xml).find("release").each(function() { var $release_id = $(this).attr("id"); @@ -154,9 +154,9 @@ function showReleases(xml) { }); }); var $result = $title + " [Year: " + $year + ", Format: " + $format + ", Tracks: " + $tracks + ", Country: " + $country + "]"; - $("" + $result + "").attr("id", $release_id).appendTo("#results2"); + $('' + $result + "").attr("id", $release_id).appendTo("#results2"); - $("View on MusicBrainz" + "").attr("id", "mb").appendTo("#results2"); + $('View on MusicBrainz' + "").attr("id", "mb").appendTo("#results2"); }); parseTags(xml); @@ -236,7 +236,7 @@ function populateForm(xml) { $country_text + $barcode_text + "Tracks: " + $track_count + "\n" + "\n" + - "Track List:" + "\n"; + "Track list:" + "\n"; for (var i = 0; i < $track_titles.length; i++) { $description = $description + "[#]" + $track_titles[i] + "\n"; };