phpBB

Code Changes

File: phpbb/plupload/plupload.php

  Unmodified   Added   Modified   Removed
Line 39Line 39
	protected $user;

/**

	protected $user;

/**

	* @var \phpbb\php\ini

	* @var \bantu\IniGetWrapper\IniGetWrapper

	*/
protected $php_ini;


	*/
protected $php_ini;


Line 67Line 67
	* @param \phpbb\config\config $config
* @param \phpbb\request\request_interface $request
* @param \phpbb\user $user

	* @param \phpbb\config\config $config
* @param \phpbb\request\request_interface $request
* @param \phpbb\user $user

	* @param \phpbb\php\ini $php_ini

	* @param \bantu\IniGetWrapper\IniGetWrapper $php_ini

	* @param \phpbb\mimetype\guesser $mimetype_guesser
*/

	* @param \phpbb\mimetype\guesser $mimetype_guesser
*/

	public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \phpbb\php\ini $php_ini, \phpbb\mimetype\guesser $mimetype_guesser)

	public function __construct($phpbb_root_path, \phpbb\config\config $config, \phpbb\request\request_interface $request, \phpbb\user $user, \bantu\IniGetWrapper\IniGetWrapper $php_ini, \phpbb\mimetype\guesser $mimetype_guesser)

	{
$this->phpbb_root_path = $phpbb_root_path;
$this->config = $config;

	{
$this->phpbb_root_path = $phpbb_root_path;
$this->config = $config;

Line 266Line 266
		if ($this->config['img_max_height'] > 0 && $this->config['img_max_width'] > 0)
{
$resize = sprintf(

		if ($this->config['img_max_height'] > 0 && $this->config['img_max_width'] > 0)
{
$resize = sprintf(

				'resize: {width: %d, height: %d, quality: 100},',

				'resize: {width: %d, height: %d, quality: 85},',

				(int) $this->config['img_max_width'],
(int) $this->config['img_max_height']
);

				(int) $this->config['img_max_width'],
(int) $this->config['img_max_height']
);

Line 284Line 284
	public function get_chunk_size()
{
$max = min(

	public function get_chunk_size()
{
$max = min(

			$this->php_ini->get_bytes('upload_max_filesize'),
$this->php_ini->get_bytes('post_max_size'),
max(1, $this->php_ini->get_bytes('memory_limit')),

			$this->php_ini->getBytes('upload_max_filesize'),
$this->php_ini->getBytes('post_max_size'),
max(1, $this->php_ini->getBytes('memory_limit')),

			$this->config['max_filesize']
);


			$this->config['max_filesize']
);


Line 303Line 303
			$this->temporary_directory,
$this->config['plupload_salt'],
md5($file_name),

			$this->temporary_directory,
$this->config['plupload_salt'],
md5($file_name),

			\filespec::get_extension($file_name)

			\phpbb\files\filespec::get_extension($file_name)

		);
}


		);
}