revert User::getDonateStatusAttribute()

This commit is contained in:
xiaomlove
2022-05-31 01:10:20 +08:00
parent 86bc9f136a
commit cf11dc33e0
3 changed files with 29 additions and 15 deletions

View File

@@ -543,22 +543,22 @@ if (count($updateset)) // Update only when there is change in peer counts
sql_query("UPDATE torrents SET " . join(",", $updateset) . " WHERE id = $torrentid");
}
if($client_familyid != 0 && $client_familyid != $az['clientselect'])
$USERUPDATESET[] = "clientselect = ".sqlesc($client_familyid);
if(count($USERUPDATESET) && $userid)
{
/**
* VIP do not calculate downloaded
* @since 1.7.13
*/
if ($az['class'] == UC_VIP) {
foreach ($USERUPDATESET as $key => $value) {
if (str_contains($value, 'downloaded')) {
unset($USERUPDATESET[$key]);
}
if($client_familyid != 0 && $client_familyid != $az['clientselect']) {
$USERUPDATESET[] = "clientselect = ".sqlesc($client_familyid);
}
/**
* VIP do not calculate downloaded
* @since 1.7.13
*/
if ($az['class'] == UC_VIP) {
foreach ($USERUPDATESET as $key => $value) {
if (str_contains($value, 'downloaded')) {
unset($USERUPDATESET[$key]);
}
}
}
if(count($USERUPDATESET) && $userid)
{
sql_query("UPDATE users SET " . join(",", $USERUPDATESET) . " WHERE id = ".$userid);
}
benc_resp($rep_dict);