summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorBenjamin Southall <applemansigloo@gmail.com>2016-09-25 16:34:47 +0900
committerBenjamin Southall <applemansigloo@gmail.com>2016-09-25 16:34:47 +0900
commita3b9c4405c6d4cca2a70dbb400e3ba3f65e7ea04 (patch)
tree5a2ebdb801748586e3fde7c12cbeda169b2c3e31 /mod.php
parent9436524a306c8e3d6d8a6ed195e2a3c56d5cde39 (diff)
parenta4b619ae5eaab5755dc215a496854dee8f7ce395 (diff)
Merged lainchan with vichan master at 25/9/2016 a4b619ae5eaab5755dc215a496854dee8f7ce395 @czaks czaks committed on GitHub 2 days ago
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php35
1 files changed, 18 insertions, 17 deletions
diff --git a/mod.php b/mod.php
index 8ae4a107..b282b8ca 100644
--- a/mod.php
+++ b/mod.php
@@ -5,22 +5,14 @@
*/
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);
-// Fix for magic quotes
-if (get_magic_quotes_gpc()) {
- function strip_array($var) {
- return is_array($var) ? array_map('strip_array', $var) : stripslashes($var);
- }
-
- $_GET = strip_array($_GET);
- $_POST = strip_array($_POST);
-}
+require_once 'inc/bans.php';
+require_once 'inc/mod/pages.php';
+
+check_login(true);
$query = isset($_SERVER['QUERY_STRING']) ? rawurldecode($_SERVER['QUERY_STRING']) : '';
@@ -47,11 +39,19 @@ $pages = array(
'/log' => 'log', // modlog
'/log/(\d+)' => 'log', // modlog
- '/log:([^/]+)' => 'user_log', // modlog
- '/log:([^/]+)/(\d+)' => 'user_log', // modlog
- '/news' => 'secure_POST news', // view news
- '/news/(\d+)' => 'secure_POST news', // view news
- '/news/delete/(\d+)' => 'secure news_delete', // delete from news
+ '/log:([^/:]+)' => 'user_log', // modlog
+ '/log:([^/:]+)/(\d+)' => 'user_log', // modlog
+ '/log:b:([^/]+)' => 'board_log', // modlog
+ '/log:b:([^/]+)/(\d+)' => 'board_log', // modlog
+
+ '/edit_news' => 'secure_POST news', // view news
+ '/edit_news/(\d+)' => 'secure_POST news', // view news
+ '/edit_news/delete/(\d+)' => 'secure news_delete', // delete from news
+
+ '/edit_pages(?:/?(\%b)?)' => 'secure_POST pages',
+ '/edit_page/(\d+)' => 'secure_POST edit_page',
+ '/edit_pages/delete/([a-z0-9]+)' => 'secure delete_page',
+ '/edit_pages/delete/([a-z0-9]+)/(\%b)' => 'secure delete_page_board',
'/noticeboard' => 'secure_POST noticeboard', // view noticeboard
'/noticeboard/(\d+)' => 'secure_POST noticeboard', // view noticeboard
@@ -88,6 +88,7 @@ $pages = array(
'/(\%b)/deletebyip/(\d+)(/global)?' => 'secure deletebyip', // delete all posts by IP address
'/(\%b)/(un)?lock/(\d+)' => 'secure lock', // lock thread
'/(\%b)/(un)?sticky/(\d+)' => 'secure sticky', // sticky thread
+ '/(\%b)/(un)?cycle/(\d+)' => 'secure cycle', // cycle thread
'/(\%b)/bump(un)?lock/(\d+)' => 'secure bumplock', // "bumplock" thread
'/themes' => 'themes_list', // manage themes