aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/attachment/upload.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2015-09-19 16:50:21 +0200
committerMarc Alexander <admin@m-a-styles.de>2015-10-09 09:46:10 +0200
commit6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51 (patch)
tree8349b9f828d0dbb694cd5a39b276f86f93b2cddc /phpBB/phpbb/attachment/upload.php
parent07c8e21e8033f35483b5c96653f616b6f094138e (diff)
downloadforums-6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51.tar
forums-6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51.tar.gz
forums-6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51.tar.bz2
forums-6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51.tar.xz
forums-6c1cd26b7a3602932f3571eebcd5a21d1ce8ae51.zip
[ticket/14168] Split thumbnail creation to separate method
PHPBB3-14168
Diffstat (limited to 'phpBB/phpbb/attachment/upload.php')
-rw-r--r--phpBB/phpbb/attachment/upload.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/phpBB/phpbb/attachment/upload.php b/phpBB/phpbb/attachment/upload.php
index c7de323699..fa6fbad60d 100644
--- a/phpBB/phpbb/attachment/upload.php
+++ b/phpBB/phpbb/attachment/upload.php
@@ -245,6 +245,21 @@ class upload
}
// Create Thumbnail
+ $filedata = $this->create_thumbnail($file, $filedata);
+
+ return $filedata;
+ }
+
+ /**
+ * Create thumbnail for file if necessary
+ *
+ * @param \phpbb\files\filespec $file
+ * @param array $filedata File's filedata
+ *
+ * @return array Updated $filedata
+ */
+ protected function create_thumbnail(\phpbb\files\filespec $file, $filedata)
+ {
if ($filedata['thumbnail'])
{
$source = $file->get('destination_file');