From f9ca74d763e570bd8004ec432c8d9c69d6c5d9e7 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Fri, 13 Apr 2012 02:31:59 +1000 Subject: [PATCH] use "!" delimiter to make things easier --- mod.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mod.php b/mod.php index 6e13cbec..0ac83f46 100644 --- a/mod.php +++ b/mod.php @@ -21,16 +21,16 @@ if (get_magic_quotes_gpc()) { $query = isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : ''; $pages = array( - '/^$/' => ':?/', // redirect to dashboard - '/^\/$/' => 'dashboard', // dashboard + '!^$!' => ':?/', // redirect to dashboard + '!^/$!' => 'dashboard', // dashboard - '/^\/IP\/(.+)$/' => 'ip', // view ip address + '!^/IP/(.+)$!' => 'ip', // view ip address // This should always be at the end: - '/^\/(\w+)\/' . preg_quote($config['file_index'], '/') . '?$/' => 'view_board', - '/^\/(\w+)\/' . str_replace('%d', '(\d+)', preg_quote($config['file_page'], '/')) . '$/' => 'view_board', - '/^\/(\w+)\/' . preg_quote($config['dir']['res'], '/') . - str_replace('%d', '(\d+)', preg_quote($config['file_page'], '/')) . '$/' => 'view_thread', + '!^/(\w+)/' . preg_quote($config['file_index'], '!') . '?$!' => 'view_board', + '!^/(\w+)/' . str_replace('%d', '(\d+)', preg_quote($config['file_page'], '!')) . '$!/' => 'view_board', + '!^/(\w+)/' . preg_quote($config['dir']['res'], '!') . + str_replace('%d', '(\d+)', preg_quote($config['file_page'], '!')) . '$!' => 'view_thread', ); if (!$mod)