Empty commit

This commit is contained in:
Git 2011-10-23 08:00:13 +00:00
parent 2cf7dfb2ef
commit 46c909e007
2 changed files with 15 additions and 19 deletions

View File

@ -9,6 +9,20 @@
$UserID = $LoggedUser['ID'];
}
if(isset($_POST['all'])) {
authorize();
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID<>'$SessionID'");
$Cache->delete_value('users_sessions_'.$UserID);
}
if (isset($_POST['session'])) {
authorize();
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID='".db_string($_POST['session'])."'");
$Cache->delete_value('users_sessions_'.$UserID);
}
$UserSessions = $Cache->get_value('users_sessions_'.$UserID);
if(!is_array($UserSessions)) {
$DB->query("SELECT
@ -24,25 +38,6 @@
$Cache->cache_value('users_sessions_'.$UserID, $UserSessions, 0);
}
if(isset($_POST['all'])) {
authorize();
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID<>'$SessionID'");
$UserSessions = array($SessionID=>array('SessionID'=>$SessionID,'Browser'=>$Browser,'OperatingSystem'=>$OperatingSystem,'IP'=>$SessionIP,'LastUpdate'=>sqltime()));
$Cache->cache_value('users_sessions_'.$UserID, $UserSessions, 0);
}
if (isset($_POST['session'])) {
authorize();
$DB->query("DELETE FROM users_sessions WHERE UserID='$UserID' AND SessionID='".db_string($_POST['session'])."'");
unset($UserSessions[$_POST['session']]);
$Cache->begin_transaction('users_sessions_'.$UserID);
$Cache->delete_row($_POST['session']);
$Cache->commit_transaction(0);
}
list($UserID, $Username) = array_values(user_info($UserID));
show_header($Username.' &gt; Sessions');
?>

View File

@ -510,6 +510,7 @@
$EnableStr .= ' (Ratio: '.number_format($Cur['Uploaded']/$Cur['Downloaded'],2).', RR: '.number_format($Cur['RequiredRatio'],2).')';
if ($Cur['RatioWatchEnds'] != '0000-00-00 00:00:00') {
$UpdateSet[]="i.RatioWatchEnds=NOW()";
$UpdateSet[]="i.RatioWatchDownload=m.Downloaded";
$CanLeech = 0;
}
update_tracker('update_user', array('passkey' => $Cur['torrent_pass'], 'can_leech' => '0'));