mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-05 22:14:59 +02:00
Various small changes based on feedback from nn- * Renaming $php_ext to $phpEx * Fixing copyright years * Explain $ignore_config * Explain Regex * Copypasta package error * rename get_singleton PHPBB3-10018
62 lines
939 B
PHP
62 lines
939 B
PHP
<?php
|
|
/**
|
|
*
|
|
* @package avatar
|
|
* @copyright (c) 2011 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
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
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,
|
|
);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function handle_form($template, &$error = array(), $submitted = false)
|
|
{
|
|
if ($submitted) {
|
|
$error[] = 'TODO';
|
|
return '';
|
|
}
|
|
else
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
}
|