diff options
| author | czaks <marcin@6irc.net> | 2015-08-11 04:51:27 +0200 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2015-08-11 04:51:27 +0200 |
| commit | 706feeddff55ecafc397137dbc005890fdef963d (patch) | |
| tree | 6e51abd3f60439a7d395ce4e97e8b2ed23a66f13 | |
| parent | f6efdee873a17b13f17508b78cf6fc32c0c539d7 (diff) | |
fix cache_config: webms were thumbnailed twice and with the latest addition, they couldn`t resize at all
| -rwxr-xr-x | inc/functions.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/inc/functions.php b/inc/functions.php index aa91133f..515e3e55 100755 --- a/inc/functions.php +++ b/inc/functions.php @@ -249,9 +249,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: @@ -287,10 +287,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'); @@ -308,6 +307,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)) { |
