mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-18 12:11:36 +00:00
Fix bug where invite tree would break because the wrong query id was used
Unset because it's re-used later Remove cache lock from ip_bans
This commit is contained in:
parent
80422131d6
commit
65229141f1
@ -391,16 +391,9 @@ function site_ban_ip($IP) {
|
||||
$IP = ip2unsigned($IP);
|
||||
$IPBans = $Cache->get_value('ip_bans');
|
||||
if(!is_array($IPBans)) {
|
||||
//Cache lock!
|
||||
$Lock = $Cache->get_value('ip_bans_lock');
|
||||
if($Lock && substr($_SERVER['REQUEST_URI'], 0, 29) != '/torrents.php?action=download') {
|
||||
?><script type="script/javascript">setTimeout('window.location="http://<?=NONSSL_SITE_URL?><?=$_SERVER['REQUEST_URI']?>"', 5)</script><?
|
||||
} else {
|
||||
$Cache->cache_value('ip_bans_lock', '1', 10);
|
||||
$DB->query("SELECT ID, FromIP, ToIP FROM ip_bans");
|
||||
$IPBans = $DB->to_array(0, MYSQLI_NUM);
|
||||
$Cache->cache_value('ip_bans', $IPBans, 0);
|
||||
}
|
||||
$DB->query("SELECT ID, FromIP, ToIP FROM ip_bans");
|
||||
$IPBans = $DB->to_array(0, MYSQLI_NUM);
|
||||
$Cache->cache_value('ip_bans', $IPBans, 0);
|
||||
}
|
||||
foreach($IPBans as $Index => $IPBan) {
|
||||
list($ID, $FromIP, $ToIP) = $IPBan;
|
||||
|
@ -41,7 +41,7 @@
|
||||
$ForumID = $ThreadInfo['ForumID'];
|
||||
|
||||
// Make sure they're allowed to look at the page
|
||||
if($Forums[$ForumID]['MinClassRead'] > $LoggedUser['Class'] || (isset($LoggedUser['CustomForums'][$ForumID]) && $LoggedUser['CustomForums'][$ForumID] == 0)) {
|
||||
if(!check_forumperm($ForumID)) {
|
||||
error(403);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user