mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/8672] User $user->lang() instead of sprintf
PHPBB3-8672
This commit is contained in:
parent
31bcdb23a2
commit
55c5bc126d
2 changed files with 3 additions and 3 deletions
|
@ -417,11 +417,11 @@ class filespec
|
||||||
{
|
{
|
||||||
if (!isset($types[$this->image_info['type']]))
|
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
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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', 'txt_as_img', 'image/jpg', 'txt', false, true),
|
||||||
array('txt_copy_2', 'txt_moved', 'text/plain', '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('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),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue