mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-13 02:46:30 +00:00
Empty commit
This commit is contained in:
parent
261a8ce9b5
commit
ac36796484
@ -427,20 +427,7 @@ function site_ban_ip($IP) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (BLOCK_TOR) {
|
||||
$TorIPs = $Cache->get_value('tor_ips');
|
||||
if (!is_array($TorIPs)) {
|
||||
$TorIPs = file('https://check.torproject.org/cgi-bin/TorBulkExitList.py?ip=' . SITE_IP, FILE_IGNORE_NEW_LINES);
|
||||
if($TorIPs === false) {
|
||||
$Cache->cache_value('tor_ips', array(), 1800);
|
||||
} else {
|
||||
$Cache->cache_value('tor_ips', $TorIPs, 3600 * 4);
|
||||
}
|
||||
}
|
||||
if (in_array($IP, $TorIPs)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@
|
||||
list($ArtistName) = $DB->next_record(MYSQLI_NUM,false);
|
||||
|
||||
$DB->query("SELECT GroupID FROM torrents_artists WHERE ArtistID='$ArtistID'");
|
||||
if($DB->record_count() == 0) { error(404); }
|
||||
$GroupIDs = $DB->collect(0,false);
|
||||
|
||||
$SQL = "SELECT CASE ";
|
||||
|
@ -460,7 +460,7 @@
|
||||
} elseif($EnableUser == '1') {
|
||||
$Cache->increment('stats_user_count');
|
||||
$UpdateSet[]="i.RatioWatchDownload='0'";
|
||||
if ($Cur['Uploaded']/$Cur['Downloaded'] > $Cur['RequiredRatio']) {
|
||||
if ($Cur['Uploaded']/$Cur['Downloaded'] >= $Cur['RequiredRatio']) {
|
||||
$UpdateSet[]="i.RatioWatchEnds='0000-00-00 00:00:00'";
|
||||
$CanLeech = 1;
|
||||
$UpdateSet[]="m.can_leech='1'";
|
||||
|
Loading…
Reference in New Issue
Block a user