1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2025-01-19 01:24:05 +01:00

Fix webm bug: Wrong max length shown in error message

This commit is contained in:
8chan 2015-02-16 16:19:55 -08:00
parent df7c7c8454
commit 2cb1bbe3da
2 changed files with 2 additions and 2 deletions

View File

@ -1105,7 +1105,7 @@
$config['error']['webmerror'] = _('There was a problem processing your webm.');//Is this error used anywhere ?
$config['error']['invalidwebm'] = _('Invalid webm uploaded.');
$config['error']['webmhasaudio'] = _('The uploaded webm contains an audio or another type of additional stream.');
$config['error']['webmtoolong'] = _('The uploaded webm is longer than ' . $config['webm']['max_length'] . ' seconds.');
$config['error']['webmtoolong'] = _('The uploaded webm is longer than %d seconds.');
$config['error']['fileexists'] = _('That file <a href="%s">already exists</a>!');
$config['error']['fileexistsinthread'] = _('That file <a href="%s">already exists</a> in this thread!');
$config['error']['delete_too_soon'] = _('You\'ll have to wait another %s before deleting that.');

View File

@ -50,7 +50,7 @@ function is_valid_webm($ffprobe_out) {
return array('code' => 2, 'msg' => $config['error']['invalidwebm']);
if ($ffprobe_out['format']['duration'] > $config['webm']['max_length'])
return array('code' => 4, 'msg' => $config['error']['webmtoolong']);
return array('code' => 4, 'msg' => sprintf($config['error']['webmtoolong'], $config['webm']['max_length']));
}
function make_webm_thumbnail($filename, $thumbnail, $width, $height, $duration) {