aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar/driver/remote.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-01-07 22:49:48 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-01-07 23:02:07 +0100
commit023d7a972dd5c279e0b0b24801f9e53e7865d39a (patch)
tree441a940978d677ff310b951f664043ddb7726462 /phpBB/includes/avatar/driver/remote.php
parent8867cb60b1f7074c9f83c0403e5259148da65204 (diff)
downloadforums-023d7a972dd5c279e0b0b24801f9e53e7865d39a.tar
forums-023d7a972dd5c279e0b0b24801f9e53e7865d39a.tar.gz
forums-023d7a972dd5c279e0b0b24801f9e53e7865d39a.tar.bz2
forums-023d7a972dd5c279e0b0b24801f9e53e7865d39a.tar.xz
forums-023d7a972dd5c279e0b0b24801f9e53e7865d39a.zip
[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
Diffstat (limited to 'phpBB/includes/avatar/driver/remote.php')
-rw-r--r--phpBB/includes/avatar/driver/remote.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php
index 717b73eb0c..e8f182063e 100644
--- a/phpBB/includes/avatar/driver/remote.php
+++ b/phpBB/includes/avatar/driver/remote.php
@@ -36,11 +36,11 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
/**
* @inheritdoc
*/
- public function prepare_form($template, $row, &$error)
+ public function prepare_form($request, $template, $row, &$error)
{
$template->assign_vars(array(
- 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('avatar_remote_width', 0),
- 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('avatar_remote_width', 0),
+ 'AVATAR_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_remote_width', 0),
+ 'AVATAR_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $request->variable('avatar_remote_width', 0),
'AVATAR_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '',
));
@@ -50,11 +50,11 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
/**
* @inheritdoc
*/
- public function process_form($template, $row, &$error)
+ public function process_form($request, $template, $row, &$error)
{
- $url = $this->request->variable('avatar_remote_url', '');
- $width = $this->request->variable('avatar_remote_width', 0);
- $height = $this->request->variable('avatar_remote_height', 0);
+ $url = $request->variable('avatar_remote_url', '');
+ $width = $request->variable('avatar_remote_width', 0);
+ $height = $request->variable('avatar_remote_height', 0);
if (!preg_match('#^(http|https|ftp)://#i', $url))
{