phpBB

Code Changes

File: phpbb/console/command/thumbnail/generate.php

  Unmodified   Added   Modified   Removed
Line 19Line 19

class generate extends \phpbb\console\command\command
{


class generate extends \phpbb\console\command\command
{

 
	/**
* @var \phpbb\config\config
*/
protected $config;


	/**
* @var \phpbb\db\driver\driver_interface
*/

	/**
* @var \phpbb\db\driver\driver_interface
*/

Line 45Line 50
	/**
* Constructor
*

	/**
* Constructor
*

 
	* @param \config\config $config The config

	* @param \phpbb\user $user The user object (used to get language information)
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\service $cache The cache service
* @param string $phpbb_root_path Root path
* @param string $php_ext PHP extension
*/

	* @param \phpbb\user $user The user object (used to get language information)
* @param \phpbb\db\driver\driver_interface $db Database connection
* @param \phpbb\cache\service $cache The cache service
* @param string $phpbb_root_path Root path
* @param string $php_ext PHP extension
*/

	public function __construct(\phpbb\user $user, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $phpbb_root_path, $php_ext)

	public function __construct(\phpbb\config\config $config, \phpbb\user $user, \phpbb\db\driver\driver_interface $db, \phpbb\cache\service $cache, $phpbb_root_path, $php_ext)

	{

	{

 
		$this->config = $config;

		$this->db = $db;
$this->cache = $cache;
$this->phpbb_root_path = $phpbb_root_path;

		$this->db = $db;
$this->cache = $cache;
$this->phpbb_root_path = $phpbb_root_path;

Line 126Line 133
		{
if (isset($extensions[$row['extension']]['display_cat']) && $extensions[$row['extension']]['display_cat'] == ATTACHMENT_CATEGORY_IMAGE)
{

		{
if (isset($extensions[$row['extension']]['display_cat']) && $extensions[$row['extension']]['display_cat'] == ATTACHMENT_CATEGORY_IMAGE)
{

				$source = $this->phpbb_root_path . 'files/' . $row['physical_filename'];
$destination = $this->phpbb_root_path . 'files/thumb_' . $row['physical_filename'];

				$source = $this->phpbb_root_path . $this->config['upload_path'] . '/' . $row['physical_filename'];
$destination = $this->phpbb_root_path . $this->config['upload_path'] . '/thumb_' . $row['physical_filename'];


if (create_thumbnail($source, $destination, $row['mimetype']))
{


if (create_thumbnail($source, $destination, $row['mimetype']))
{