1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 04:34:07 +02:00

[feature/avatars] Remove $request property and pass as argument if needed

Remove the $request property from the phpbb_avatar_driver class and rather
pass it as function argument if it's needed in a function. Currently this
is only the case for the class methods prepare_form() and process_form().

PHPBB3-10018
This commit is contained in:
Marc Alexander
2013-01-07 22:49:48 +01:00
parent 8867cb60b1
commit 023d7a972d
12 changed files with 41 additions and 46 deletions

View File

@@ -36,7 +36,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
/**
* @inheritdoc
*/
public function prepare_form($template, $row, &$error)
public function prepare_form($request, $template, $row, &$error)
{
if (!$this->can_upload())
{
@@ -54,7 +54,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
/**
* @inheritdoc
*/
public function process_form($template, $row, &$error)
public function process_form($request, $template, $row, &$error)
{
if (!$this->can_upload())
{
@@ -68,8 +68,8 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
$upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $this->config['avatar_filesize'], $this->config['avatar_min_width'], $this->config['avatar_min_height'], $this->config['avatar_max_width'], $this->config['avatar_max_height'], (isset($this->config['mime_triggers']) ? explode('|', $this->config['mime_triggers']) : false));
$url = $this->request->variable('avatar_upload_url', '');
$upload_file = $this->request->file('avatar_upload_file');
$url = $request->variable('avatar_upload_url', '');
$upload_file = $request->file('avatar_upload_file');
if (!empty($upload_file['name']))
{