mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-03 16:34:55 +02:00
[ticket/14168] Split thumbnail creation to separate method
PHPBB3-14168
This commit is contained in:
@ -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');
|
||||
|
Reference in New Issue
Block a user