summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSimon McFarlane <simon@piston.pw>2015-05-26 23:31:47 -0700
committerSimon McFarlane <simon@piston.pw>2015-05-29 01:34:53 -0700
commit4b40f69a4e6d190f6d342875bd084c2a6c9d8b0f (patch)
treefcc5dc9efa24afcb0bda3740b59f0c4e81c42f62 /mod.php
parent2ac451ecb7aaae1ed1402425b8df6a5cb9831f2b (diff)
parentd20149b57929c27da87a7d9603d85717da15c5bc (diff)
Merge remote-tracking branch 'upstream/master' into vichan-merge
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',
);