diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 9be141e925f..f884a66f6ba 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -149,56 +149,15 @@ llxHeader("",""); print_fiche_titre($langs->trans("ModulesSetup"),'','setup'); -if ($mode==0) print $langs->trans("ModulesDesc")."
\n"; -if ($mode==1) print $langs->trans("ModulesInterfaceDesc")."
\n"; -if ($mode==2) print $langs->trans("ModulesSpecialDesc")."
\n"; -if ($mode==3) print $langs->trans("ModulesJobDesc")."
\n"; -print "
\n"; - - -$h = 0; - -$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=0"; -$head[$h][1] = $langs->trans("ModulesCommon"); -$h++; - -$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=1"; -$head[$h][1] = $langs->trans("ModulesInterfaces"); -$h++; - -$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=2"; -$head[$h][1] = $langs->trans("ModulesSpecial"); -$h++; - -$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=3"; -$head[$h][1] = $langs->trans("ModulesJob"); - - -dolibarr_fiche_head($head, $mode, $langs->trans("Modules")); - - -if ($mesg) print '
'.$mesg.'
'; - -print "\n"; -print "\n"; -print " \n"; -print " \n"; -print " \n"; -print " \n"; -//print " \n"; -print " \n"; -print " \n"; -print " \n"; -print "\n"; - - +// Recherche les modules $dir = DOL_DOCUMENT_ROOT . "/includes/modules/"; // Charge tableaux modules, nom, numero, orders depuis répertoire dir $handle=opendir($dir); -$nom = array(); +$filename = array(); $modules = array(); $orders = array(); +$categ = array(); $i = 0; $j = 0; while (($file = readdir($handle))!==false) @@ -222,8 +181,9 @@ while (($file = readdir($handle))!==false) } $modules[$i] = $objMod; - $nom[$i] = $modName; + $filename[$i]= $modName; $orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module + $categ[$objMod->special]++; // Array of all different modules categories $j++; $i++; } @@ -231,6 +191,75 @@ while (($file = readdir($handle))!==false) } asort($orders); + + +// Affichage debut page + +if ($mode==0) print $langs->trans("ModulesDesc")."
\n"; +if ($mode==1) print $langs->trans("ModulesInterfaceDesc")."
\n"; +if ($mode==2) print $langs->trans("ModulesSpecialDesc")."
\n"; +if ($mode==3) print $langs->trans("ModulesJobDesc")."
\n"; +print "
\n"; + + +$h = 0; + +$categidx=0; +if ($categ[$categidx]) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; + $head[$h][1] = $langs->trans("ModulesCommon"); + $head[$h][2] = 'common'; + $h++; +} + +$categidx=1; +if ($categ[$categidx]) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; + $head[$h][1] = $langs->trans("ModulesInterfaces"); + $head[$h][2] = 'interfaces'; + $h++; +} + +$categidx=2; +if ($categ[$categidx]) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx; + $head[$h][1] = $langs->trans("ModulesOther"); + $head[$h][2] = 'other'; + $h++; +} + +$categidx=3; +if ($categ[$categidx]) +{ + $head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=3"; + $head[$h][1] = $langs->trans("ModulesJob"); + $head[$h][2] = 'functional'; + $h++; +} + +dolibarr_fiche_head($head, $mode, $langs->trans("Modules")); + + +if ($mesg) print '
'.$mesg.'
'; + +print "
".$langs->trans("Family")."".$langs->trans("Module")."".$langs->trans("Description")."".$langs->trans("Version")."".$langs->trans("DbVersion")."".$langs->trans("Activated")."".$langs->trans("Action")."".$langs->trans("SetupShort")."
\n"; +print "\n"; +print " \n"; +print " \n"; +print " \n"; +print " \n"; +//print " \n"; +print " \n"; +print " \n"; +print " \n"; +print "\n"; + + +// Affichage liste modules + $var=True; $familylib=array( @@ -248,8 +277,8 @@ foreach ($orders as $key => $value) $tab=split('_',$value); $family=$tab[0]; $numero=$tab[1]; - $modName = $nom[$key]; - $objMod = $modules[$key]; + $modName = $filename[$key]; + $objMod = $modules[$key]; // On affiche pas les modules en version 'development' si // constante MAIN_SHOW_DEVELOPMENT_MODULES non définie diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 3d6dd0cc7b2..4f0a9858850 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -69,7 +69,9 @@ else // Check PHP support for $_POST if (! isset($_GET["testget"]) && ! isset($_POST["testpost"])) { - print 'Error '.$langs->trans("PHPSupportPOSTGETKo")."
\n"; + print 'Warning '.$langs->trans("PHPSupportPOSTGETKo"); + print ' ('.$langs->trans("Recheck").')'; + print "
\n"; $checksok=0; } else diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index be9928a7789..218672420c4 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -38,7 +38,8 @@ OtherSetup=Other setup Modules=Modules ModulesCommon=Common modules ModulesInterfaces=Interfaces modules -ModulesSpecial=Special modules +ModulesOther=Other modules +ModulesJob=Setup modules ParameterInDolibarr=Parameter %s LanguageParameter=Language parameter %s LanguageBrowserParameter=Parameter %s diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 457aafba50f..1f44573b12b 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -38,7 +38,7 @@ OtherSetup=Divers Modules=Modules ModulesCommon=Modules standards ModulesInterfaces=Modules interfaces -ModulesSpecial=Modules spéciaux +ModulesOther=Modules autres ModulesJob=Modules métiers ParameterInDolibarr=Variable %s LanguageParameter=Variable langue %s
".$langs->trans("Family")."".$langs->trans("Module")."".$langs->trans("Description")."".$langs->trans("Version")."".$langs->trans("DbVersion")."".$langs->trans("Activated")."".$langs->trans("Action")."".$langs->trans("SetupShort")."