diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-04-18 14:01:21 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-04-24 13:34:18 +0200 |
commit | 55c5bc126decffeaa74abdb853eb010cc3dcda8c (patch) | |
tree | a04b1550161b9cdd839aa5c8106a89e90d2c8ace | |
parent | 31bcdb23a2a00f704efcd58877802ed5ac4507a9 (diff) | |
download | forums-55c5bc126decffeaa74abdb853eb010cc3dcda8c.tar forums-55c5bc126decffeaa74abdb853eb010cc3dcda8c.tar.gz forums-55c5bc126decffeaa74abdb853eb010cc3dcda8c.tar.bz2 forums-55c5bc126decffeaa74abdb853eb010cc3dcda8c.tar.xz forums-55c5bc126decffeaa74abdb853eb010cc3dcda8c.zip |
[ticket/8672] User $user->lang() instead of sprintf
PHPBB3-8672
-rw-r--r-- | phpBB/includes/functions_upload.php | 4 | ||||
-rw-r--r-- | tests/upload/filespec_test.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index ea82a23082..ac5313ca06 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -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); } } diff --git a/tests/upload/filespec_test.php b/tests/upload/filespec_test.php index 8fbb437ef0..f6deb242a2 100644 --- a/tests/upload/filespec_test.php +++ b/tests/upload/filespec_test.php @@ -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), ); } |