mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-28 01:10:51 +01:00
fix mod.php. check if key is there and is valid
This commit is contained in:
parent
70a06116e5
commit
401b506691
2
mod.php
2
mod.php
@ -132,7 +132,7 @@ foreach ($pages as $key => $callback) {
|
|||||||
if (is_string($callback) && preg_match('/^secure /', $callback))
|
if (is_string($callback) && preg_match('/^secure /', $callback))
|
||||||
$key .= '(/(?P<token>[a-f0-9]{8}))?';
|
$key .= '(/(?P<token>[a-f0-9]{8}))?';
|
||||||
$key = str_replace('\%b', '?P<board>' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key);
|
$key = str_replace('\%b', '?P<board>' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key);
|
||||||
$new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback;
|
$new_pages[(!empty($key) and $key[0] == '!') ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback;
|
||||||
}
|
}
|
||||||
$pages = $new_pages;
|
$pages = $new_pages;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user