aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/avatar/driver
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2012-12-01 00:27:52 +0100
committerMarc Alexander <admin@m-a-styles.de>2012-12-01 00:27:52 +0100
commitd439f477105903ceb29652f23bcb7812d0f34d4d (patch)
tree2ee3eb00037896e8bf31c3a69b0b04db5d55b840 /phpBB/includes/avatar/driver
parent081440f6c4bd6b7c2838dd0587ed6a4dffc87d52 (diff)
downloadforums-d439f477105903ceb29652f23bcb7812d0f34d4d.tar
forums-d439f477105903ceb29652f23bcb7812d0f34d4d.tar.gz
forums-d439f477105903ceb29652f23bcb7812d0f34d4d.tar.bz2
forums-d439f477105903ceb29652f23bcb7812d0f34d4d.tar.xz
forums-d439f477105903ceb29652f23bcb7812d0f34d4d.zip
[feature/avatars] Fix docblocks and minor cosmetic issues
PHPBB3-10018
Diffstat (limited to 'phpBB/includes/avatar/driver')
-rw-r--r--phpBB/includes/avatar/driver/gravatar.php2
-rw-r--r--phpBB/includes/avatar/driver/interface.php27
-rw-r--r--phpBB/includes/avatar/driver/local.php2
-rw-r--r--phpBB/includes/avatar/driver/remote.php2
4 files changed, 21 insertions, 12 deletions
diff --git a/phpBB/includes/avatar/driver/gravatar.php b/phpBB/includes/avatar/driver/gravatar.php
index 8fa95bf937..11996ca561 100644
--- a/phpBB/includes/avatar/driver/gravatar.php
+++ b/phpBB/includes/avatar/driver/gravatar.php
@@ -72,7 +72,7 @@ class phpbb_avatar_driver_gravatar extends phpbb_avatar_driver
$row['avatar_width'] = $this->request->variable('avatar_gravatar_width', 0);
$row['avatar_height'] = $this->request->variable('avatar_gravatar_height', 0);
- if (!function_exists('user_add'))
+ if (!function_exists('validate_data'))
{
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
}
diff --git a/phpBB/includes/avatar/driver/interface.php b/phpBB/includes/avatar/driver/interface.php
index bba4bd102e..e8f529f3c4 100644
--- a/phpBB/includes/avatar/driver/interface.php
+++ b/phpBB/includes/avatar/driver/interface.php
@@ -24,7 +24,7 @@ interface phpbb_avatar_driver_interface
/**
* Returns the name of the driver.
*
- * @return string Name of wrapped driver.
+ * @return string Name of driver.
*/
public function get_name();
@@ -50,10 +50,13 @@ interface phpbb_avatar_driver_interface
/**
* Prepare form for changing the settings of this avatar
*
- * @param object $template Template object
+ * @param phpbb_template $template Template object
* @param array $row User data or group data that has been cleaned with
* phpbb_avatar_manager::clean_row
- * @param array &$error Reference to an error array
+ * @param array &$error Reference to an error array that is filled by this
+ * function. Key values can either be a string with a language key or
+ * an array that will be passed to vsprintf() with the language key in
+ * the first array key.
*
* @return bool True if form has been successfully prepared
*/
@@ -62,17 +65,22 @@ interface phpbb_avatar_driver_interface
/**
* Prepare form for changing the acp settings of this avatar
*
- * @return array Array containing the acp settings
+ * @return array Array of configuration options as consumed by acp_board.
+ * The setting for enabling/disabling the avatar will be handled by
+ * the avatar manager.
*/
public function prepare_form_acp();
/**
* Process form data
*
- * @param object $template Template object
+ * @param phpbb_template $template Template object
* @param array $row User data or group data that has been cleaned with
* phpbb_avatar_manager::clean_row
- * @param array &$error Reference to an error array
+ * @param array &$error Reference to an error array that is filled by this
+ * function. Key values can either be a string with a language key or
+ * an array that will be passed to vsprintf() with the language key in
+ * the first array key.
*
* @return array Array containing the avatar data as follows:
* ['avatar'], ['avatar_width'], ['avatar_height']
@@ -85,14 +93,15 @@ interface phpbb_avatar_driver_interface
* @param array $row 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
+ * @return bool True if avatar has been deleted or there is no need to delete,
+ * i.e. when the avatar is not hosted locally.
*/
public function delete($row);
/**
- * Get the avatars template name
+ * Get the avatar driver's template name
*
- * @return string Avatar's template name
+ * @return string Avatar driver's template name
*/
public function get_template_name();
}
diff --git a/phpBB/includes/avatar/driver/local.php b/phpBB/includes/avatar/driver/local.php
index 4593161a76..d7611b903a 100644
--- a/phpBB/includes/avatar/driver/local.php
+++ b/phpBB/includes/avatar/driver/local.php
@@ -174,7 +174,7 @@ class phpbb_avatar_driver_local extends phpbb_avatar_driver
);
}
}
- @ksort($avatar_list);
+ ksort($avatar_list);
if ($this->cache != null)
{
diff --git a/phpBB/includes/avatar/driver/remote.php b/phpBB/includes/avatar/driver/remote.php
index e96cb35684..9135a62eac 100644
--- a/phpBB/includes/avatar/driver/remote.php
+++ b/phpBB/includes/avatar/driver/remote.php
@@ -61,7 +61,7 @@ class phpbb_avatar_driver_remote extends phpbb_avatar_driver
$url = 'http://' . $url;
}
- if (!function_exists('user_add'))
+ if (!function_exists('validate_data'))
{
require($this->phpbb_root_path . 'includes/functions_user' . $this->php_ext);
}