summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
authorMichael Walker <mike@barrucadu.co.uk>2015-09-12 21:03:54 +0100
committerMichael Walker <mike@barrucadu.co.uk>2015-09-12 21:03:54 +0100
commit166ba2a0a205c88bdb8fcc6fc538a0bdc01b60d9 (patch)
tree5a7293c0d78804f72e253e385d015162e029777b /inc/functions.php
parent05c569e656070f086de49d24749d4b18916975da (diff)
parent844b26216614d953ee8521838f1030ad59d735ec (diff)
Merge remote-tracking branch 'vichan/master'
Diffstat (limited to 'inc/functions.php')
-rwxr-xr-xinc/functions.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 068f9783..cd1f8fde 100755
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -250,9 +250,9 @@ function loadConfig() {
if ($config['allow_roll'])
event_handler('post', 'diceRoller');
- if (is_array($config['anonymous']))
- $config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])];
-
+ if (in_array('webm', $config['allowed_ext_files']) ||
+ in_array('mp4', $config['allowed_ext_files']))
+ event_handler('post', 'postHandler');
}
// Effectful config processing below:
@@ -288,10 +288,9 @@ function loadConfig() {
if ($config['cache']['enabled'])
require_once 'inc/cache.php';
- if (in_array('webm', $config['allowed_ext_files'])) {
+ if (in_array('webm', $config['allowed_ext_files']) ||
+ in_array('mp4', $config['allowed_ext_files']))
require_once 'inc/lib/webm/posthandler.php';
- event_handler('post', 'postHandler');
- }
event('load-config');
@@ -309,6 +308,9 @@ function loadConfig() {
Cache::set('config_'.$boardsuffix, $config);
Cache::set('events_'.$boardsuffix, $events);
}
+
+ if (is_array($config['anonymous']))
+ $config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])];
if ($config['debug']) {
if (!isset($debug)) {