1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-24 07:30:10 +01:00

fix permissions

This commit is contained in:
Savetheinternet 2011-04-13 19:39:21 +10:00
parent 4fbf878a21
commit d57bbaf496

View File

@ -1481,6 +1481,7 @@
else 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']);
// Ban page // Ban page
if(isset($_POST['new_ban'])) { if(isset($_POST['new_ban'])) {
@ -1590,11 +1591,13 @@
header('Location: ?/', true, $config['redirect_http']); header('Location: ?/', true, $config['redirect_http']);
} }
} elseif(preg_match('/^\/' . $regex['board'] . 'ban(&delete)?\/(\d+)$/', $query, $matches)) { } elseif(preg_match('/^\/' . $regex['board'] . 'ban(&delete)?\/(\d+)$/', $query, $matches)) {
if($mod['type'] < $config['mod']['delete']) error($config['error']['noaccess']); if($mod['type'] < $config['mod']['ban']) error($config['error']['noaccess']);
// Ban by post // Ban by post
$boardName = $matches[1]; $boardName = $matches[1];
$delete = isset($matches[2]) && $matches[2] == '&delete'; $delete = isset($matches[2]) && $matches[2] == '&delete';
if($delete && $mod['type'] < $config['mod']['delete']) error($config['error']['noaccess']);
$post = $matches[3]; $post = $matches[3];
// Open board // Open board
if(!openBoard($boardName)) if(!openBoard($boardName))