From 364c1bc93b0c08105cb20d8d45afdd3474f91b72 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 1 Nov 2014 16:01:22 -0700 Subject: [PATCH] PDF uploading --- inc/8chan-mod-pages.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/8chan-mod-pages.php b/inc/8chan-mod-pages.php index ca4188f1..5f0e68dc 100644 --- a/inc/8chan-mod-pages.php +++ b/inc/8chan-mod-pages.php @@ -258,6 +258,9 @@ if (!in_array($b, $mod['boards']) and $mod['boards'][0] != '*') error($config['error']['noaccess']); + + if (!hasPermission($config['mod']['edit_settings'], $b)) + error($config['error']['noaccess']); if (!openBoard($b)) error("Could not open board!"); @@ -279,6 +282,7 @@ $image_reject_repost = isset($_POST['image_reject_repost']) ? 'true' : 'false'; $allow_delete = isset($_POST['allow_delete']) ? 'true' : 'false'; $allow_flash = isset($_POST['allow_flash']) ? '$config[\'allowed_ext_files\'][] = \'swf\';' : ''; + $allow_pdf = isset($_POST['allow_pdf']) ? '$config[\'allowed_ext_files\'][] = \'pdf\';' : ''; $code_tags = isset($_POST['code_tags']) ? '$config[\'additional_javascript\'][] = \'js/code_tags/run_prettify.js\';$config[\'markup\'][] = array("/\[code\](.+?)\[\/code\]/ms", "
\$1
");' : ''; $katex = isset($_POST['katex']) ? '$config[\'katex\'] = true;$config[\'additional_javascript\'][] = \'js/katex/katex.min.js\'; $config[\'markup\'][] = array("/\[tex\](.+?)\[\/tex\]/ms", "\$1"); $config[\'additional_javascript\'][] = \'js/katex-enable.js\';' : ''; $oekaki_js = <<