we shouldn't be redirecting to the referer'
This commit is contained in:
parent
370b829460
commit
6ca99d189d
24
mod.php
Normal file → Executable file
24
mod.php
Normal file → Executable file
@ -1257,9 +1257,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/reports', true, $config['redirect_http']);
|
header('Location: ?/reports', true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/board\/(\w+)(\/delete)?$/', $query, $matches)) {
|
} elseif(preg_match('/^\/board\/(\w+)(\/delete)?$/', $query, $matches)) {
|
||||||
if($mod['type'] < $config['mod']['manageboards']) error($config['error']['noaccess']);
|
if($mod['type'] < $config['mod']['manageboards']) error($config['error']['noaccess']);
|
||||||
@ -1700,9 +1697,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/' . $regex['board'] . 'delete\/(\d+)$/', $query, $matches)) {
|
} elseif(preg_match('/^\/' . $regex['board'] . 'delete\/(\d+)$/', $query, $matches)) {
|
||||||
if($mod['type'] < $config['mod']['delete']) error($config['error']['noaccess']);
|
if($mod['type'] < $config['mod']['delete']) error($config['error']['noaccess']);
|
||||||
@ -1724,9 +1718,6 @@
|
|||||||
buildIndex();
|
buildIndex();
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/' . $regex['board'] . '(un)?sticky\/(\d+)$/', $query, $matches)) {
|
} elseif(preg_match('/^\/' . $regex['board'] . '(un)?sticky\/(\d+)$/', $query, $matches)) {
|
||||||
if($mod['type'] < $config['mod']['sticky']) error($config['error']['noaccess']);
|
if($mod['type'] < $config['mod']['sticky']) error($config['error']['noaccess']);
|
||||||
@ -1758,9 +1749,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/' . $regex['board'] . '(un)?lock\/(\d+)$/', $query, $matches)) {
|
} elseif(preg_match('/^\/' . $regex['board'] . '(un)?lock\/(\d+)$/', $query, $matches)) {
|
||||||
if($mod['type'] < $config['mod']['lock']) error($config['error']['noaccess']);
|
if($mod['type'] < $config['mod']['lock']) error($config['error']['noaccess']);
|
||||||
@ -1792,9 +1780,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// Redirect
|
// Redirect
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/' . $regex['board'] . 'deletebyip\/(\d+)$/', $query, $matches)) {
|
} elseif(preg_match('/^\/' . $regex['board'] . 'deletebyip\/(\d+)$/', $query, $matches)) {
|
||||||
// Delete all posts by an IP
|
// Delete all posts by an IP
|
||||||
@ -1830,9 +1815,6 @@
|
|||||||
|
|
||||||
buildIndex();
|
buildIndex();
|
||||||
|
|
||||||
if(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
} elseif(preg_match('/^\/ban$/', $query)) {
|
} elseif(preg_match('/^\/ban$/', $query)) {
|
||||||
if($mod['type'] < $config['mod']['ban']) error($config['error']['noaccess']);
|
if($mod['type'] < $config['mod']['ban']) error($config['error']['noaccess']);
|
||||||
@ -1952,8 +1934,6 @@
|
|||||||
header('Location: ' . $_POST['continue'], true, $config['redirect_http']);
|
header('Location: ' . $_POST['continue'], true, $config['redirect_http']);
|
||||||
elseif(isset($board))
|
elseif(isset($board))
|
||||||
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
header('Location: ?/' . sprintf($config['board_path'], $boardName) . $config['file_index'], true, $config['redirect_http']);
|
||||||
elseif(isset($_SERVER['HTTP_REFERER']))
|
|
||||||
header('Location: ' . $_SERVER['HTTP_REFERER'], true, $config['redirect_http']);
|
|
||||||
else
|
else
|
||||||
header('Location: ?/', true, $config['redirect_http']);
|
header('Location: ?/', true, $config['redirect_http']);
|
||||||
}
|
}
|
||||||
@ -1980,7 +1960,7 @@
|
|||||||
|
|
||||||
$post = $query->fetch();
|
$post = $query->fetch();
|
||||||
|
|
||||||
$body = form_newBan($post['ip'], null, isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : false, $post['id'], $boardName, !$delete);
|
$body = form_newBan($post['ip'], null, '?/' . sprintf($config['board_path'], $board['uri']) . $config['file_index'], $post['id'], $boardName, !$delete);
|
||||||
|
|
||||||
echo Element('page.html', Array(
|
echo Element('page.html', Array(
|
||||||
'config'=>$config,
|
'config'=>$config,
|
||||||
@ -2183,7 +2163,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($mod['type'] >= $config['mod']['ip_banform'])
|
if($mod['type'] >= $config['mod']['ip_banform'])
|
||||||
$body .= form_newBan($ip, null, isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : false);
|
$body .= form_newBan($ip, null, '?/IP/' . $ip);
|
||||||
|
|
||||||
echo Element('page.html', Array(
|
echo Element('page.html', Array(
|
||||||
'config'=>$config,
|
'config'=>$config,
|
||||||
|
Loading…
Reference in New Issue
Block a user