diff options
author | Marc Alexander <admin@m-a-styles.de> | 2012-11-16 17:39:32 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2012-11-16 17:39:32 +0100 |
commit | 517d3f56ac72a686522e5eb0685952c44e889b79 (patch) | |
tree | b8d047d6f1aa6029c89d76f0862a5274acdb57d8 /phpBB/includes/avatar/driver | |
parent | 0a5d54cc9b4ece668ba59d41a281c147874f3c5c (diff) | |
download | forums-517d3f56ac72a686522e5eb0685952c44e889b79.tar forums-517d3f56ac72a686522e5eb0685952c44e889b79.tar.gz forums-517d3f56ac72a686522e5eb0685952c44e889b79.tar.bz2 forums-517d3f56ac72a686522e5eb0685952c44e889b79.tar.xz forums-517d3f56ac72a686522e5eb0685952c44e889b79.zip |
[feature/avatars] Use correct names of input fields
The name of the avatar input fields seem to have been copied from the local
avatar (gallery avatar). Since the input fields have different names in
the template files of the remote and gravatar avatars this will not
properly default to the entered values.
Additionally, the focused driver wasn't correctly filtered causing use to
always default to no avatar.
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar/driver')
-rw-r--r-- | phpBB/includes/avatar/driver/gravatar.php | 4 | ||||
-rw-r--r-- | phpBB/includes/avatar/driver/remote.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php index 0ac7d71bef..b07af59366 100644 --- a/phpBB/includes/avatar/driver/gravatar.php +++ b/phpBB/includes/avatar/driver/gravatar.php @@ -70,8 +70,8 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver public function prepare_form($template, $row, &$error) { $template->assign_vars(array( - 'AV_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_local_width', 0), - 'AV_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_local_width', 0), + 'AV_GRAVATAR_WIDTH' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_gravatar_width', 0), + 'AV_GRAVATAR_HEIGHT' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_gravatar_width', 0), 'AV_GRAVATAR_EMAIL' => (($row['avatar_type'] == $this->get_name() || $row['avatar_type'] == 'gravatar') && $row['avatar']) ? $row['avatar'] : '', )); diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php index fbe158d200..3c06209352 100644 --- a/phpBB/includes/avatar/driver/remote.php +++ b/phpBB/includes/avatar/driver/remote.php @@ -50,8 +50,8 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver public function prepare_form($template, $row, &$error) { $template->assign_vars(array( - 'AV_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_local_width', 0), - 'AV_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_local_width', 0), + 'AV_REMOTE_WIDTH' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_width']) ? $row['avatar_width'] : $this->request->variable('av_remote_width', 0), + 'AV_REMOTE_HEIGHT' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar_height']) ? $row['avatar_height'] : $this->request->variable('av_remote_width', 0), 'AV_REMOTE_URL' => ((in_array($row['avatar_type'], array(AVATAR_REMOTE, $this->get_name(), 'remote'))) && $row['avatar']) ? $row['avatar'] : '', )); |