1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/avatars] Fix the docs and small naming fixes

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-19 00:30:18 +01:00
parent bea6e845d3
commit 8d0c667dce
7 changed files with 71 additions and 20 deletions

View File

@@ -81,7 +81,7 @@ abstract class phpbb_avatar_driver implements phpbb_avatar_driver_interface
public $custom_html = false;
/**
* Construct an driver object
* Construct a driver object
*
* @param $config The phpBB configuration
* @param $request The request object

View File

@@ -19,11 +19,10 @@ if (!defined('IN_PHPBB'))
* Handles avatars hosted at gravatar.com
* @package avatars
*/
// @todo: rename classes to phpbb_ext_foo_avatar_driver_foo and similar
class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
{
/**
* We'll need to create a different type of avatar for gravatar
* @inheritdoc
*/
public $custom_html = true;
@@ -32,7 +31,6 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
*/
public function get_data($row, $ignore_config = false)
{
// @todo: add allow_avatar_gravatar to database_update.php etc.
if ($ignore_config || $this->config['allow_avatar_gravatar'])
{
return array(

View File

@@ -51,27 +51,51 @@ interface phpbb_avatar_driver_interface
public function get_custom_html($row, $ignore_config = false, $alt = '');
/**
* @TODO
* Prepare form for changing the settings of this avatar
*
* @param object $template The template object
* @param array $row The user data or group data that has been cleaned with
* phpbb_avatar_manager::clean_row
* @param array &$error The reference to an error array
*
* @return bool Returns true if form has been successfully prepared
**/
public function prepare_form($template, $row, &$error);
/**
* @TODO
* Process form data
*
* @param object $template The template object
* @param array $row The user data or group data that has been cleaned with
* phpbb_avatar_manager::clean_row
* @param array &$error The reference to an error array
*
* @return array An array containing the avatar data as follows:
* ['avatar'], ['avatar_width'], ['avatar_height']
**/
public function process_form($template, $row, &$error);
/**
* @TODO
* Delete avatar
*
* @param array $row The user data or group data that has been cleaned with
* phpbb_avatar_manager::clean_row
*
* @return bool True if avatar has been deleted or there is no need to delete
**/
public function delete($row);
/**
* @TODO
* Check if avatar is enabled
*
* @return bool True if avatar is enabled, false if it's disabled
**/
public function is_enabled();
/**
* @TODO
* Get the avatars template name
*
* @return string The avatars template name
**/
public function get_template_name();
}

View File

@@ -132,7 +132,9 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
}
/**
* @TODO
* Get a list of avatars that are locally available
*
* @return array An array containing the locally available avatars
*/
private function get_avatar_list()
{

View File

@@ -139,7 +139,9 @@ class phpbb_avatar_driver_upload extends phpbb_avatar_driver
}
/**
* @TODO
* Check if user is able to upload an avatar
*
* @return bool True if user can upload, false if not
*/
private function can_upload()
{