diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6bb8049f6f6..a192b54c200 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5258,7 +5258,7 @@ class Form * @param int $addlinktofullsize Add link to fullsize image * @return string HTML code to output photo */ - static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='',$addlinktofullsize=1) + static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $imagesize='', $addlinktofullsize=1) { global $conf,$langs; @@ -5294,7 +5294,6 @@ class Form $dir=$conf->user->dir_output; if (! empty($object->photo)) { - //var_dump(getImageFileNameForSize($object->photo, '_mini')); if ($imagesize == 'mini') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_mini'); else if ($imagesize == 'small') $file=get_exdir($id, 2, 0, 0, $object, 'user').getImageFileNameForSize($object->photo, '_small'); else $file=get_exdir($id, 2, 0, 0, $object, 'user').$object->photo; diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index dd63a144226..e281f4002f3 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1825,14 +1825,15 @@ class User extends CommonObject * @param int $width Width of image * @param int $height Height of image * @param string $cssclass Force a css class + * @param string $imagesize 'mini', 'small' or '' (original) * @return string String with URL link */ - function getPhotoUrl($width, $height, $cssclass='') + function getPhotoUrl($width, $height, $cssclass='', $imagesize='') { $result=''; $result.=''; - $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass); + $result.=Form::showphoto('userphoto', $this, $width, $height, 0, $cssclass, $imagesize); $result.=''; return $result;