mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +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,17 +391,10 @@ function site_ban_ip($IP) {
|
|||||||
$IP = ip2unsigned($IP);
|
$IP = ip2unsigned($IP);
|
||||||
$IPBans = $Cache->get_value('ip_bans');
|
$IPBans = $Cache->get_value('ip_bans');
|
||||||
if(!is_array($IPBans)) {
|
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");
|
$DB->query("SELECT ID, FromIP, ToIP FROM ip_bans");
|
||||||
$IPBans = $DB->to_array(0, MYSQLI_NUM);
|
$IPBans = $DB->to_array(0, MYSQLI_NUM);
|
||||||
$Cache->cache_value('ip_bans', $IPBans, 0);
|
$Cache->cache_value('ip_bans', $IPBans, 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
foreach($IPBans as $Index => $IPBan) {
|
foreach($IPBans as $Index => $IPBan) {
|
||||||
list($ID, $FromIP, $ToIP) = $IPBan;
|
list($ID, $FromIP, $ToIP) = $IPBan;
|
||||||
if($IP >= $FromIP && $IP <= $ToIP) {
|
if($IP >= $FromIP && $IP <= $ToIP) {
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
$ForumID = $ThreadInfo['ForumID'];
|
$ForumID = $ThreadInfo['ForumID'];
|
||||||
|
|
||||||
// Make sure they're allowed to look at the page
|
// 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);
|
error(403);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user