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); } ?>