1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-21 09:52:26 +01:00

[ticket/8672] User $user->lang() instead of sprintf

PHPBB3-8672
This commit is contained in:
Marc Alexander 2015-04-18 14:01:21 +02:00
parent 31bcdb23a2
commit 55c5bc126d
2 changed files with 3 additions and 3 deletions

View File

@ -417,11 +417,11 @@ class filespec
{
if (!isset($types[$this->image_info['type']]))
{
$this->error[] = sprintf($user->lang['IMAGE_FILETYPE_INVALID'], $this->image_info['type'], $this->mimetype);
$this->error[] = $user->lang('IMAGE_FILETYPE_INVALID', $this->image_info['type'], $this->mimetype);
}
else
{
$this->error[] = sprintf($user->lang['IMAGE_FILETYPE_MISMATCH'], $types[$this->image_info['type']][0], $this->extension);
$this->error[] = $user->lang('IMAGE_FILETYPE_MISMATCH', $types[$this->image_info['type']][0], $this->extension);
}
}

View File

@ -287,7 +287,7 @@ class phpbb_filespec_test extends phpbb_test_case
array('txt_copy', 'txt_as_img', 'image/jpg', 'txt', false, true),
array('txt_copy_2', 'txt_moved', 'text/plain', 'txt', false, true),
array('jpg_copy', 'jpg_moved', 'image/png', 'jpg', false, true),
array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH', true),
array('png_copy', 'png_moved', 'image/png', 'jpg', 'IMAGE_FILETYPE_MISMATCH png jpg', true),
);
}