aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_user.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2011-11-30 21:03:29 +0100
committerJoas Schilling <nickvergessen@gmx.de>2011-11-30 21:03:29 +0100
commitb790d2e2839850c053b6fecc4f5d767746c47f20 (patch)
tree7125e0c1b89776cc83c3d9347fb04edc125435f1 /phpBB/includes/functions_user.php
parent6472a270e0faf39c7dd9b73a8948f19254e0a17e (diff)
downloadforums-b790d2e2839850c053b6fecc4f5d767746c47f20.tar
forums-b790d2e2839850c053b6fecc4f5d767746c47f20.tar.gz
forums-b790d2e2839850c053b6fecc4f5d767746c47f20.tar.bz2
forums-b790d2e2839850c053b6fecc4f5d767746c47f20.tar.xz
forums-b790d2e2839850c053b6fecc4f5d767746c47f20.zip
[ticket/10345] Add documentation and phpbb_ prefix to the new avatar functions
PHPBB3-10345
Diffstat (limited to 'phpBB/includes/functions_user.php')
-rw-r--r--phpBB/includes/functions_user.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php
index e3537fe328..5631928f96 100644
--- a/phpBB/includes/functions_user.php
+++ b/phpBB/includes/functions_user.php
@@ -2039,7 +2039,7 @@ function avatar_remote($data, &$error)
{
if ($width > $config['avatar_max_width'] || $height > $config['avatar_max_height'])
{
- $error[] = avatar_error_wrong_size($width, $height);
+ $error[] = phpbb_avatar_error_wrong_size($width, $height);
return false;
}
}
@@ -2048,7 +2048,7 @@ function avatar_remote($data, &$error)
{
if ($width < $config['avatar_min_width'] || $height < $config['avatar_min_height'])
{
- $error[] = avatar_error_wrong_size($width, $height);
+ $error[] = phpbb_avatar_error_wrong_size($width, $height);
return false;
}
}
@@ -2388,7 +2388,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
{
if ($data['width'] > $config['avatar_max_width'] || $data['height'] > $config['avatar_max_height'])
{
- $error[] = avatar_error_wrong_size($data['width'], $data['height']);
+ $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);
}
}
@@ -2398,7 +2398,7 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
{
if ($data['width'] < $config['avatar_min_width'] || $data['height'] < $config['avatar_min_height'])
{
- $error[] = avatar_error_wrong_size($data['width'], $data['height']);
+ $error[] = phpbb_avatar_error_wrong_size($data['width'], $data['height']);
}
}
}
@@ -2444,7 +2444,14 @@ function avatar_process_user(&$error, $custom_userdata = false, $can_upload = nu
return (sizeof($error)) ? false : true;
}
-function avatar_error_wrong_size($width, $height)
+/**
+* Returns a language string with the avatar size of the new avatar and the allowed maximum and minimum
+*
+* @param $width int The width of the new uploaded/selected avatar
+* @param $height int The height of the new uploaded/selected avatar
+* @return string
+*/
+function phpbb_avatar_error_wrong_size($width, $height)
{
global $config, $user;
@@ -2457,7 +2464,12 @@ function avatar_error_wrong_size($width, $height)
$user->lang('PIXELS', (int) $height));
}
-function avatar_explanation_string()
+/**
+* Returns an explanation string with maximum avatar settings
+*
+* @return string
+*/
+function phpbb_avatar_explanation_string()
{
global $config, $user;