mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 20:21:37 +00:00
Empty commit
This commit is contained in:
parent
7422f408f7
commit
a7056c9651
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user