This commit is contained in:
towards_a_new_leftypol 2020-12-21 00:00:09 -05:00 committed by towards-a-new-leftypol
parent f75d42d9c4
commit 3e9c52cec4
2 changed files with 5 additions and 2 deletions

View file

@ -138,8 +138,10 @@ if (isset($config['mod']['custom_pages'])) {
$new_pages = array();
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 = str_replace('\%b', '?P<board>' . sprintf(substr($config['board_path'], 0, -1), $config['board_regex']), $key);
$new_pages[@$key[0] == '!' ? $key : '!^' . $key . '(?:&[^&=]+=[^&]*)*$!u'] = $callback;
}