diff options
author | Marc Alexander <admin@m-a-styles.de> | 2012-12-17 12:59:44 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2012-12-17 17:42:13 +0100 |
commit | 54d96dfac720d5aa1cdc617ca93749d26ee9f264 (patch) | |
tree | 9f9a5e009453c973497c35c3950c903560f44e38 /tests/mock | |
parent | 9420647c43b300699afe6fe72f09d1746daf64a2 (diff) | |
download | forums-54d96dfac720d5aa1cdc617ca93749d26ee9f264.tar forums-54d96dfac720d5aa1cdc617ca93749d26ee9f264.tar.gz forums-54d96dfac720d5aa1cdc617ca93749d26ee9f264.tar.bz2 forums-54d96dfac720d5aa1cdc617ca93749d26ee9f264.tar.xz forums-54d96dfac720d5aa1cdc617ca93749d26ee9f264.zip |
[ticket/10763] Make functions for remote avatars static
fileupload::image_types() and filespec::get_extension() are called
statically while submitting the form for the remote avatar. Make them
static as described in the ticket in order to prevent a PHP notice.
Also change the tests to use the static functions.
PHPBB3-10763
Diffstat (limited to 'tests/mock')
-rw-r--r-- | tests/mock/fileupload.php | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/tests/mock/fileupload.php b/tests/mock/fileupload.php index 409036ba63..cbcbf4a6ab 100644 --- a/tests/mock/fileupload.php +++ b/tests/mock/fileupload.php @@ -20,33 +20,4 @@ class phpbb_mock_fileupload { return true; } - - /** - * Copied verbatim from phpBB/includes/functions_upload.php's fileupload - * class to ensure the correct behaviour of filespec::move_file. - * - * Maps file extensions to the constant in second index of the array - * returned by getimagesize() - */ - public function image_types() - { - return array( - IMAGETYPE_GIF => array('gif'), - IMAGETYPE_JPEG => array('jpg', 'jpeg'), - IMAGETYPE_PNG => array('png'), - IMAGETYPE_SWF => array('swf'), - IMAGETYPE_PSD => array('psd'), - IMAGETYPE_BMP => array('bmp'), - IMAGETYPE_TIFF_II => array('tif', 'tiff'), - IMAGETYPE_TIFF_MM => array('tif', 'tiff'), - IMAGETYPE_JPC => array('jpg', 'jpeg'), - IMAGETYPE_JP2 => array('jpg', 'jpeg'), - IMAGETYPE_JPX => array('jpg', 'jpeg'), - IMAGETYPE_JB2 => array('jpg', 'jpeg'), - IMAGETYPE_SWC => array('swc'), - IMAGETYPE_IFF => array('iff'), - IMAGETYPE_WBMP => array('wbmp'), - IMAGETYPE_XBM => array('xbm'), - ); - } } |