aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar/driver/local.php
diff options
context:
space:
mode:
authorCullen Walsh <ckwalsh@cullenwalsh.com>2011-06-18 22:50:52 -0700
committerCullen Walsh <ckwalsh@cullenwalsh.com>2012-03-18 22:21:36 +0000
commita06380c69a154659f4f9985238008640670669e0 (patch)
treeda434f22d28052a74d33d43ad1f8c92f1fb13e36 /phpBB/includes/avatar/driver/local.php
parentd0bb14ded1960de47eb07d955a483d74fd9e0af2 (diff)
downloadforums-a06380c69a154659f4f9985238008640670669e0.tar
forums-a06380c69a154659f4f9985238008640670669e0.tar.gz
forums-a06380c69a154659f4f9985238008640670669e0.tar.bz2
forums-a06380c69a154659f4f9985238008640670669e0.tar.xz
forums-a06380c69a154659f4f9985238008640670669e0.zip
[feature/avatars] Make avatars generic
Adding a cleaning function for data coming from the users/groups tables so drivers only deal with clean data (ideally). Refactored get_user_avatar() and get_group_avatar() to use an underlying get_avatar() function. PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar/driver/local.php')
-rw-r--r--phpBB/includes/avatar/driver/local.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/phpBB/includes/avatar/driver/local.php b/phpBB/includes/avatar/driver/local.php
index 216ad2ce46..edd62696f0 100644
--- a/phpBB/includes/avatar/driver/local.php
+++ b/phpBB/includes/avatar/driver/local.php
@@ -24,14 +24,14 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
/**
* @inheritdoc
*/
- public function get_data($user_row, $ignore_config = false)
+ public function get_data($row, $ignore_config = false)
{
if ($ignore_config || $this->config['allow_avatar_local'])
{
return array(
- 'src' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $user_row['user_avatar'],
- 'width' => $user_row['user_avatar_width'],
- 'height' => $user_row['user_avatar_height'],
+ 'src' => $this->phpbb_root_path . $this->config['avatar_gallery_path'] . '/' . $row['avatar'],
+ 'width' => $row['avatar_width'],
+ 'height' => $row['avatar_height'],
);
}
else
@@ -47,7 +47,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
/**
* @inheritdoc
*/
- public function prepare_form($template, $user_row, &$error)
+ public function prepare_form($template, $row, &$error)
{
$avatar_list = $this->get_avatar_list();
$category = request_var('av_local_cat', '');
@@ -83,7 +83,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
/**
* @inheritdoc
*/
- public function process_form($template, $user_row, &$error)
+ public function process_form($template, $row, &$error)
{
$avatar_list = $this->get_avatar_list();
$category = request_var('av_local_cat', '');
@@ -96,9 +96,9 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
}
return array(
- 'user_avatar' => $category . '/' . $file,
- 'user_avatar_width' => $avatar_list[$category][urldecode($file)]['width'],
- 'user_avatar_height' => $avatar_list[$category][urldecode($file)]['height'],
+ 'avatar' => $category . '/' . $file,
+ 'avatar_width' => $avatar_list[$category][urldecode($file)]['width'],
+ 'avatar_height' => $avatar_list[$category][urldecode($file)]['height'],
);
}