mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-23 03:38:52 +00:00
[ticket/14168] Split thumbnail creation to separate method
PHPBB3-14168
This commit is contained in:
parent
07c8e21e80
commit
6c1cd26b7a
1 changed files with 15 additions and 0 deletions
|
@ -245,6 +245,21 @@ class upload
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Thumbnail
|
// 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'])
|
if ($filedata['thumbnail'])
|
||||||
{
|
{
|
||||||
$source = $file->get('destination_file');
|
$source = $file->get('destination_file');
|
||||||
|
|
Loading…
Add table
Reference in a new issue