phpBB

Code Changes

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

  Unmodified   Added   Modified   Removed
Line 18Line 18

class delete extends \phpbb\console\command\command
{


class delete extends \phpbb\console\command\command
{

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


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

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

Line 32Line 37
	/**
* 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 string $phpbb_root_path Root path
*/

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

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

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

	{

	{

 
		$this->config = $config;

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


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


Line 101Line 108
		$return = 0;
while ($row = $this->db->sql_fetchrow($result))
{

		$return = 0;
while ($row = $this->db->sql_fetchrow($result))
{

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

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


if (@unlink($thumbnail_path))
{


if (@unlink($thumbnail_path))
{