Empty commit

This commit is contained in:
Git 2011-10-10 08:00:12 +00:00
parent 7422f408f7
commit a7056c9651
2 changed files with 7 additions and 3 deletions

View File

@ -1849,7 +1849,7 @@ function disable_users($UserIDs, $AdminComment, $BanReason = 1) {
i.AdminComment = CONCAT('".sqltime()." - ".($AdminComment ? $AdminComment : 'Disabled by system')."\n\n', i.AdminComment),
i.BanDate='".sqltime()."',
i.BanReason='".$BanReason."',
i.RatioWatchDownload='0'
i.RatioWatchDownload=m.Downloaded
WHERE m.ID IN(".implode(',',$UserIDs).") ");
$Cache->decrement('stats_user_count',$DB->affected_rows());
foreach($UserIDs as $UserID) {

View File

@ -114,7 +114,8 @@
DisablePM,
DisableIRC,
m.RequiredRatio,
m.FLTokens
m.FLTokens,
i.RatioWatchEnds
FROM users_main AS m
JOIN users_info AS i ON i.UserID = m.ID
LEFT JOIN permissions AS p ON p.ID=m.PermissionID
@ -470,13 +471,16 @@
disable_users($UserID, '', 1);
} elseif($EnableUser == '1') {
$Cache->increment('stats_user_count');
$UpdateSet[]="i.RatioWatchDownload='0'";
if (($Cur['Downloaded'] == 0) || ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio'])) {
$UpdateSet[]="i.RatioWatchEnds='0000-00-00 00:00:00'";
$CanLeech = 1;
$UpdateSet[]="m.can_leech='1'";
$UpdateSet[]="i.RatioWatchDownload='0'";
} else {
$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[]="Enabled='1'";
$LightUpdates['Enabled'] = 1;