diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 81f564254a1..5f147017bbd 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -1683,7 +1683,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo
/**
* Show picto whatever it's its name (generic function)
*
- * @param string $alt Text on alt and title of image
+ * @param string $alt Text on alt and title of image (alt only if param notitle is set to 1)
* @param string $picto Name of image file to show ('filenew', ...)
* If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory.
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
@@ -1692,10 +1692,11 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8',$nodo
* @param string $options Add more attribute on img tag (For example 'style="float: right"')
* @param int $pictoisfullpath If 1, image path is a full path
* @param int $srconly Return only content of the src attribute of img.
+ * @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
* @return string Return img tag
* @see #img_object, #img_picto_common
*/
-function img_picto($alt, $picto, $options = '', $pictoisfullpath = false, $srconly=0)
+function img_picto($alt, $picto, $options = '', $pictoisfullpath = false, $srconly=0, $notitle=0)
{
global $conf;
@@ -1739,7 +1740,7 @@ function img_picto($alt, $picto, $options = '', $pictoisfullpath = false, $srcon
}
if ($srconly) return $fullpathpicto;
- else return '';
+ else return '
';
}
/**
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index a9ca7e4c2f7..dd32c424fac 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1421,18 +1421,17 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$logouthtmltext=$appli.' '.DOL_VERSION.'
';
$logouthtmltext.=$langs->trans("Logout").'
';
//$logouthtmltext.="
";
- if ($_SESSION["dol_authmode"] != 'forceuser'
- && $_SESSION["dol_authmode"] != 'http')
+ if ($_SESSION["dol_authmode"] != 'forceuser' && $_SESSION["dol_authmode"] != 'http')
{
$logouttext .='trans('Logout'), 'logout.png', 'class="login"');
+ $logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
$logouttext .='';
}
else
{
- $logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"');
+ $logouttext .= img_picto($langs->trans('Logout'), 'logout.png', 'class="login"', 0, 0, 1);
}
print '