Empty commit

This commit is contained in:
Git 2011-10-04 08:00:13 +00:00
parent 261a8ce9b5
commit ac36796484
3 changed files with 3 additions and 15 deletions

View File

@ -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;
}

View File

@ -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 ";

View File

@ -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'";