diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-04-13 02:31:59 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-04-13 02:32:21 +1000 |
| commit | f9ca74d763e570bd8004ec432c8d9c69d6c5d9e7 (patch) | |
| tree | 379bfb5f3b5f564889244c18115ed215f3df556b | |
| parent | 96495504631d6a4d466b93a835d7d66853e2e12b (diff) | |
use "!" delimiter to make things easier
| -rw-r--r-- | mod.php | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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) |
