From ac3679648498e16efc6d448d665a59680cf31140 Mon Sep 17 00:00:00 2001 From: Git Date: Tue, 4 Oct 2011 08:00:13 +0000 Subject: [PATCH] Empty commit --- classes/script_start.php | 15 +-------------- sections/artist/download.php | 1 + sections/user/takemoderate.php | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/classes/script_start.php b/classes/script_start.php index 57298df7..49981189 100644 --- a/classes/script_start.php +++ b/classes/script_start.php @@ -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; } diff --git a/sections/artist/download.php b/sections/artist/download.php index e934bdbe..4d7f5875 100644 --- a/sections/artist/download.php +++ b/sections/artist/download.php @@ -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 "; diff --git a/sections/user/takemoderate.php b/sections/user/takemoderate.php index 1b8cb5d7..e73e644c 100644 --- a/sections/user/takemoderate.php +++ b/sections/user/takemoderate.php @@ -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'";