Fixing style errors.
This commit is contained in:
parent
650bb54051
commit
2569c792e7
@ -102,8 +102,7 @@ foreach ($modulesdir as $dir)
|
|||||||
// File duplicate
|
// File duplicate
|
||||||
print "Warning duplicate file found : ".$file." (Found ".$dir.$file.", already found ".$modules_fullpath[$file].")<br>";
|
print "Warning duplicate file found : ".$file." (Found ".$dir.$file.", already found ".$modules_fullpath[$file].")<br>";
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// File to load
|
// File to load
|
||||||
$res = include_once $dir.$file;
|
$res = include_once $dir.$file;
|
||||||
if (class_exists($modName))
|
if (class_exists($modName))
|
||||||
@ -120,8 +119,7 @@ foreach ($modulesdir as $dir)
|
|||||||
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
|
print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)<br>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -148,8 +146,7 @@ foreach ($modules as $key=>$module)
|
|||||||
if (preg_match('/^\//', $module->picto)) $newModule->picto = img_picto($alt, $module->picto, 'width="14px"', 1);
|
if (preg_match('/^\//', $module->picto)) $newModule->picto = img_picto($alt, $module->picto, 'width="14px"', 1);
|
||||||
else $newModule->picto = img_object($alt, $module->picto, 'width="14px"');
|
else $newModule->picto = img_object($alt, $module->picto, 'width="14px"');
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
$newModule->picto = img_object($alt, 'generic', 'width="14px"');
|
$newModule->picto = img_object($alt, 'generic', 'width="14px"');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,10 +284,14 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// sort list
|
// sort list
|
||||||
if($sortfield == "name" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) { return strcasecmp($a->name, $b->name); });
|
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
if($sortfield == "name" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) { return strcasecmp($b->name, $a->name); });
|
return strcasecmp($a->name, $b->name); });
|
||||||
if($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) { return strcasecmp($a->version, $b->version); });
|
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
if($sortfield == "version" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) { return strcasecmp($b->version, $a->version); });
|
return strcasecmp($b->name, $a->name); });
|
||||||
|
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
|
return strcasecmp($a->version, $b->version); });
|
||||||
|
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
|
return strcasecmp($b->version, $a->version); });
|
||||||
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "sortIdAsc");
|
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "sortIdAsc");
|
||||||
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "sortIdDesc");
|
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "sortIdDesc");
|
||||||
if ($sortfield == "permission" && $sortorder == "asc") usort($moduleList, "sortPermissionIdsAsc");
|
if ($sortfield == "permission" && $sortorder == "asc") usort($moduleList, "sortPermissionIdsAsc");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user