diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 7b472b2a163..bc26812bd29 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5255,9 +5255,10 @@ class Form
* @param int $caneditfield Add edit fields
* @param string $cssclass CSS name to use on img for photo
* @param int $genericifundef Use a generic image if no image avaiable
+ * @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', $genericifundef=0)
+ static function showphoto($modulepart, $object, $width=100, $height=0, $caneditfield=0, $cssclass='photowithmargin', $genericifundef=0,$addlinktofullsize=1)
{
global $conf,$langs;
@@ -5303,15 +5304,15 @@ class Form
$cache='0';
if ($file && file_exists($dir."/".$file))
{
- $ret.='';
+ if ($addlinktofullsize) $ret.='';
$ret.='';
- $ret.='';
+ if ($addlinktofullsize) $ret.='';
}
else if ($altfile && file_exists($dir."/".$altfile))
{
- $ret.='';
+ if ($addlinktofullsize) $ret.='';
$ret.='
';
- $ret.='';
+ if ($addlinktofullsize) $ret.='';
}
else
{
diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php
index 2addea47f87..ae985b22be5 100644
--- a/htdocs/user/class/user.class.php
+++ b/htdocs/user/class/user.class.php
@@ -1922,7 +1922,7 @@ class User extends CommonObject
$paddafterimage='';
if (abs($withpictoimg) == 1) $paddafterimage='style="padding-right: 3px;"';
if ($withpictoimg > 0) $picto='