diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-02-19 12:24:21 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-02-19 12:24:21 +0100 |
commit | 2302cd7a42004b288c5f6be6d0e4b63fe363a983 (patch) | |
tree | d3bae66eedd762a2b92140ac8242279279c6b07c /phpBB/includes/avatar | |
parent | f09e6865f70b7b3dfedd2d436396a555a29ebe10 (diff) | |
download | forums-2302cd7a42004b288c5f6be6d0e4b63fe363a983.tar forums-2302cd7a42004b288c5f6be6d0e4b63fe363a983.tar.gz forums-2302cd7a42004b288c5f6be6d0e4b63fe363a983.tar.bz2 forums-2302cd7a42004b288c5f6be6d0e4b63fe363a983.tar.xz forums-2302cd7a42004b288c5f6be6d0e4b63fe363a983.zip |
[feature/avatars] Pass phpbb_user to prepare and process form functions
The phpbb_user object might be used for language variables and other
things.
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar')
-rw-r--r-- | phpBB/includes/avatar/driver/gravatar.php | 4 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/interface.php | 6 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/local.php | 4 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/remote.php | 4 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/upload.php | 4 |
5 files changed, 12 insertions, 10 deletions
diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php index b54aae94b7..5f4cfcebc6 100644 --- a/phpBB/includes/avatar/driver/gravatar.php +++ b/phpBB/includes/avatar/driver/gravatar.php @@ -52,7 +52,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver /** * @inheritdoc */ - public function prepare_form($request, $template, $row, &$error) + public function prepare_form($request, $template, $user, $row, &$error) { $template->assign_vars(array( 'AVATAR_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $request->variable('avatar_gravatar_width', 0), @@ -66,7 +66,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver /** * @inheritdoc */ - public function process_form($request, $template, $row, &$error) + public function process_form($request, $template, $user, $row, &$error) { $row['avatar'] = $request->variable('avatar_gravatar_email', ''); $row['avatar_width'] = $request->variable('avatar_gravatar_width', 0); diff --git a/phpBB/includes/avatar/driver/interface.php b/phpBB/includes/avatar/driver/interface.php index 9364699b5f..6ceb48ad10 100644 --- a/phpBB/includes/avatar/driver/interface.php +++ b/phpBB/includes/avatar/driver/interface.php @@ -55,6 +55,7 @@ interface phpbb_avatar_driver_interface * * @param phpbb_request $request Request object * @param phpbb_template $template Template object + * @param phpbb_user $user User object * @param array $row User data or group data that has been cleaned with * phpbb_avatar_manager::clean_row * @param array &$error Reference to an error array that is filled by this @@ -64,7 +65,7 @@ interface phpbb_avatar_driver_interface * * @return bool True if form has been successfully prepared */ - public function prepare_form($request, $template, $row, &$error); + public function prepare_form($request, $template, $user, $row, &$error); /** * Prepare form for changing the acp settings of this avatar @@ -82,6 +83,7 @@ interface phpbb_avatar_driver_interface * * @param phpbb_request $request Request object * @param phpbb_template $template Template object + * @param phpbb_user $user User object * @param array $row User data or group data that has been cleaned with * phpbb_avatar_manager::clean_row * @param array &$error Reference to an error array that is filled by this @@ -92,7 +94,7 @@ interface phpbb_avatar_driver_interface * @return array Array containing the avatar data as follows: * ['avatar'], ['avatar_width'], ['avatar_height'] */ - public function process_form($request, $template, $row, &$error); + public function process_form($request, $template, $user, $row, &$error); /** * Delete avatar diff --git a/phpBB/includes/avatar/driver/local.php b/phpBB/includes/avatar/driver/local.php index 9049cadea8..693a0ede47 100644 --- a/phpBB/includes/avatar/driver/local.php +++ b/phpBB/includes/avatar/driver/local.php @@ -36,7 +36,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver /** * @inheritdoc */ - public function prepare_form($request, $template, $row, &$error) + public function prepare_form($request, $template, $user, $row, &$error) { $avatar_list = $this->get_avatar_list(); $category = $request->variable('avatar_local_cat', ''); @@ -114,7 +114,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver /** * @inheritdoc */ - public function process_form($request, $template, $row, &$error) + public function process_form($request, $template, $user, $row, &$error) { $avatar_list = $this->get_avatar_list(); $category = $request->variable('avatar_local_cat', ''); diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php index 02098f512c..3661e16160 100644 --- a/phpBB/includes/avatar/driver/remote.php +++ b/phpBB/includes/avatar/driver/remote.php @@ -36,7 +36,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver /** * @inheritdoc */ - public function prepare_form($request, $template, $row, &$error) + public function prepare_form($request, $template, $user, $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'] : $request->variable('avatar_remote_width', 0), @@ -50,7 +50,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver /** * @inheritdoc */ - public function process_form($request, $template, $row, &$error) + public function process_form($request, $template, $user, $row, &$error) { $url = $request->variable('avatar_remote_url', ''); $width = $request->variable('avatar_remote_width', 0); diff --git a/phpBB/includes/avatar/driver/upload.php b/phpBB/includes/avatar/driver/upload.php index 56569ec63c..f91d170d7c 100644 --- a/phpBB/includes/avatar/driver/upload.php +++ b/phpBB/includes/avatar/driver/upload.php @@ -36,7 +36,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver /** * @inheritdoc */ - public function prepare_form($request, $template, $row, &$error) + public function prepare_form($request, $template, $user, $row, &$error) { if (!$this->can_upload()) { @@ -54,7 +54,7 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver /** * @inheritdoc */ - public function process_form($request, $template, $row, &$error) + public function process_form($request, $template, $user, $row, &$error) { if (!$this->can_upload()) { |