diff --git a/classes/class_paranoia.php b/classes/class_paranoia.php index 7d0c8ff0..aeb37d40 100644 --- a/classes/class_paranoia.php +++ b/classes/class_paranoia.php @@ -45,6 +45,9 @@ function check_paranoia($Property, $Paranoia, $UserClass, $UserID = false) { if(check_perms('users_override_paranoia', $UserClass)) { return true; } + if ($Property == false) { + return false; + } if(!is_array($Paranoia)) { $Paranoia = unserialize($Paranoia); } diff --git a/gazelle.sql b/gazelle.sql index 7697c558..39ead1c3 100644 --- a/gazelle.sql +++ b/gazelle.sql @@ -1268,7 +1268,8 @@ CREATE TABLE `users_sessions` ( PRIMARY KEY (`UserID`,`SessionID`), KEY `UserID` (`UserID`), KEY `LastUpdate` (`LastUpdate`), - KEY `Active` (`Active`) + KEY `Active` (`Active`), + KEY `ActiveAgeKeep` (`Active`,`LastUpdate`,`KeepLogged`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `users_subscriptions` ( diff --git a/sections/schedule/index.php b/sections/schedule/index.php index b66501a7..3d98160d 100644 --- a/sections/schedule/index.php +++ b/sections/schedule/index.php @@ -263,7 +263,7 @@ function next_hour() { sleep(3); $AgoDays = time_minus(3600*24*30); - $DB->query("SELECT UserID, SessionID FROM users_sessions WHERE LastUpdate<'$AgoDays' AND KeepLogged='1'"); + $DB->query("SELECT UserID, SessionID FROM users_sessions WHERE Active = 1 AND LastUpdate<'$AgoDays' AND KeepLogged='1'"); while(list($UserID,$SessionID) = $DB->next_record()) { $Cache->begin_transaction('users_sessions_'.$UserID); $Cache->delete_row($SessionID); @@ -275,7 +275,7 @@ function next_hour() { $AgoMins = time_minus(60*30); - $DB->query("SELECT UserID, SessionID FROM users_sessions WHERE LastUpdate<'$AgoMins' AND KeepLogged='0'"); + $DB->query("SELECT UserID, SessionID FROM users_sessions WHERE Active = 1 AND LastUpdate<'$AgoMins' AND KeepLogged='0'"); while(list($UserID,$SessionID) = $DB->next_record()) { $Cache->begin_transaction('users_sessions_'.$UserID); $Cache->delete_row($SessionID); diff --git a/sections/torrents/notify.php b/sections/torrents/notify.php index 849e7160..f119a405 100644 --- a/sections/torrents/notify.php +++ b/sections/torrents/notify.php @@ -120,7 +120,7 @@ $Data['PersonalFL'] = 1; } - $DisplayName.= "".$GroupName.""; + $DisplayName.= "".$GroupName.""; if($GroupCategoryID==1 && $GroupYear>0) { $DisplayName.= " [$GroupYear]"; diff --git a/sections/user/user.php b/sections/user/user.php index 536bf6cf..ee03f845 100644 --- a/sections/user/user.php +++ b/sections/user/user.php @@ -221,7 +221,7 @@ function check_paranoia_here($Setting) { if (check_paranoia_here('requiredratio') && isset($RequiredRatio)) { ?>