1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 01:10:51 +01:00

fix cache_config: webms were thumbnailed twice and with the latest addition, they couldn`t resize at all

This commit is contained in:
czaks 2015-08-11 04:51:27 +02:00
parent f6efdee873
commit 706feeddff

View File

@ -249,9 +249,9 @@ function loadConfig() {
if ($config['allow_roll']) if ($config['allow_roll'])
event_handler('post', 'diceRoller'); event_handler('post', 'diceRoller');
if (is_array($config['anonymous'])) if (in_array('webm', $config['allowed_ext_files']) ||
$config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])]; in_array('mp4', $config['allowed_ext_files']))
event_handler('post', 'postHandler');
} }
// Effectful config processing below: // Effectful config processing below:
@ -287,10 +287,9 @@ function loadConfig() {
if ($config['cache']['enabled']) if ($config['cache']['enabled'])
require_once 'inc/cache.php'; 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'; require_once 'inc/lib/webm/posthandler.php';
event_handler('post', 'postHandler');
}
event('load-config'); event('load-config');
@ -309,6 +308,9 @@ function loadConfig() {
Cache::set('events_'.$boardsuffix, $events); Cache::set('events_'.$boardsuffix, $events);
} }
if (is_array($config['anonymous']))
$config['anonymous'] = $config['anonymous'][array_rand($config['anonymous'])];
if ($config['debug']) { if ($config['debug']) {
if (!isset($debug)) { if (!isset($debug)) {
$debug = array( $debug = array(