summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/mod.php b/mod.php
index 434853dc..8ae4a107 100644
--- a/mod.php
+++ b/mod.php
@@ -4,9 +4,10 @@
* Copyright (c) 2010-2014 Tinyboard Development Group
*/
-require 'inc/functions.php';
-require 'inc/mod/pages.php';
-require 'inc/mod/auth.php';
+require_once 'inc/functions.php';
+require_once 'inc/bans.php';
+require_once 'inc/mod/pages.php';
+require_once 'inc/mod/auth.php';
if ($config['debug'])
$parse_start_time = microtime(true);
@@ -68,7 +69,7 @@ $pages = array(
'/ban' => 'secure_POST ban', // new ban
'/bans' => 'secure_POST bans', // ban list
- '/bans/(\d+)' => 'secure_POST bans', // ban list
+ '/bans.json' => 'secure bans_json', // ban list JSON
'/ban-appeals' => 'secure_POST ban_appeals', // view ban appeals
'/recent/(\d+)' => 'recent_posts', // view recent posts
@@ -111,6 +112,11 @@ $pages = array(
str_replace('%d', '(\d+)', preg_quote($config['file_page50'], '!')) => 'view_thread50',
'/(\%b)/' . preg_quote($config['dir']['res'], '!') .
str_replace('%d', '(\d+)', preg_quote($config['file_page'], '!')) => 'view_thread',
+
+ '/(\%b)/' . preg_quote($config['dir']['res'], '!') .
+ str_replace(array('%d','%s'), array('(\d+)', '[a-z0-9-]+'), preg_quote($config['file_page50_slug'], '!')) => 'view_thread50',
+ '/(\%b)/' . preg_quote($config['dir']['res'], '!') .
+ str_replace(array('%d','%s'), array('(\d+)', '[a-z0-9-]+'), preg_quote($config['file_page_slug'], '!')) => 'view_thread',
);