diff options
Diffstat (limited to 'phpBB/includes/avatar/driver/remote.php')
| -rw-r--r-- | phpBB/includes/avatar/driver/remote.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php new file mode 100644 index 0000000000..dbd567124d --- /dev/null +++ b/phpBB/includes/avatar/driver/remote.php @@ -0,0 +1,50 @@ +<?php +/** +* +* @package avatar +* @copyright (c) 2005, 2009 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* Handles avatars hosted remotely +* @package avatars +*/ +class phpbb_avatar_driver_remote extends phpbb_avatar_driver +{ + /** + * Get the avatar url and dimensions + * + * @param $ignore_config Whether $user or global avatar visibility settings + * should be ignored + * @return array Avatar data + */ + public function get_data($user_row, $ignore_config = false) + { + if ($ignore_config || $this->config['allow_avatar_remote']) + { + return array( + 'src' => $user_row['user_avatar'], + 'width' => $user_row['user_avatar_width'], + 'height' => $user_row['user_avatar_height'], + ); + } + else + { + return array( + 'src' => '', + 'width' => 0, + 'height' => 0, + ); + } + } +} |
