summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSimon McFarlane <simon@piston.pw>2015-06-01 16:08:19 -0700
committerSimon McFarlane <simon@piston.pw>2015-06-01 16:08:19 -0700
commit209bc5400144e448e95a68e01d842c6fab53ae71 (patch)
treeab4cc6ad241e8daccb546514330d3a5f2906e846 /mod.php
parentd1c1e5a589f30d640f5eb6303e7059105a6297f8 (diff)
parent7ab9cc43d101ed002bce392beefe1c435ab2d5b1 (diff)
Merge pull request #18 from lainchan/vichan-merge
Merge with the latest upstream vichan
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',
);