diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index d2aa7857691..78a7265a823 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -247,7 +247,7 @@ if ($mode != 4)
'technic'=>$langs->trans("ModuleFamilyTechnic"),
'other'=>$langs->trans("ModuleFamilyOther")
);
-
+
foreach ($orders as $key => $value)
{
$tab=explode('_',$value);
@@ -256,14 +256,14 @@ if ($mode != 4)
$modName = $filename[$key];
$objMod = $modules[$key];
//var_dump($objMod);
-
+
if ($objMod->special != $mode) continue; // Discard if not for tab
if (! $objMod->getName())
{
dol_syslog("Error for module ".$key." - Property name of module looks empty", LOG_WARNING);
- continue;
+ continue;
}
-
+
$const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod)));
// Load all lang files of module
@@ -314,8 +314,8 @@ if ($mode != 4)
//if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin);
if (! empty($objMod->picto))
{
- if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,'',1);
- else print img_object($alttext,$objMod->picto);
+ if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1);
+ else print img_object($alttext,$objMod->picto,' width="14px"');
}
else
{
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index 68dbb2036f8..54c7b31e3f3 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -1193,14 +1193,13 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8')
* @param alt Text of alt on image
* @param object Objet pour lequel il faut afficher le logo (example: user, group, action, bill, contract, propal, product, ...)
* Pour les modules externe utiliser nomimage@mymodule pour rechercher dans le repertoire "img" du module
- * @param cssclass Define a specific css class
+ * @param options Add more attribute on img tag
* @return string Return img tag
*/
-function img_object($alt, $object, $cssclass='')
+function img_object($alt, $object, $options='')
{
global $conf,$langs;
- $cssclass = (!empty($cssclass)?' class="'.$cssclass.'"':'');
$path = 'theme/'.$conf->theme;
$url = DOL_URL_ROOT;
@@ -1212,7 +1211,7 @@ function img_object($alt, $object, $cssclass='')
if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$object.'.png')) $url = DOL_URL_ROOT_ALT;
}
- return '
';
+ return '
';
}
/**
@@ -1237,6 +1236,7 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
{
$picto = $regs[1];
$path = $regs[2];
+ // If img file not into standard path, we use alternate path
if (DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT;
}