New: N'affiche pas les modules en version 'development'.
This commit is contained in:
parent
5a05c314f3
commit
30646d860d
@ -191,7 +191,10 @@ while (($file = readdir($handle))!==false)
|
|||||||
{
|
{
|
||||||
$j = 1000 + $i;
|
$j = 1000 + $i;
|
||||||
}
|
}
|
||||||
$modules[$i] = $modName;
|
|
||||||
|
$modules[$i] = $objMod;
|
||||||
|
|
||||||
|
$nom[$i] = $modName;
|
||||||
$numero[$i] = $j;
|
$numero[$i] = $j;
|
||||||
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
||||||
$j++;
|
$j++;
|
||||||
@ -211,21 +214,23 @@ $familylib=array(
|
|||||||
'other'=>$langs->trans("ModuleFamilyOther"),
|
'other'=>$langs->trans("ModuleFamilyOther"),
|
||||||
'technic'=>$langs->trans("ModuleFamilyTechnic"),
|
'technic'=>$langs->trans("ModuleFamilyTechnic"),
|
||||||
'financial'=>$langs->trans("ModuleFamilyFinancial"),
|
'financial'=>$langs->trans("ModuleFamilyFinancial"),
|
||||||
'experimental'=>$langs->trans("ModuleFamilyExperimental")
|
|
||||||
);
|
);
|
||||||
foreach ($orders as $key => $value)
|
foreach ($orders as $key => $value)
|
||||||
{
|
{
|
||||||
$tab=split('_',$value);
|
$tab=split('_',$value);
|
||||||
$family=$tab[0]; $numero=$tab[1];
|
$family=$tab[0]; $numero=$tab[1];
|
||||||
|
|
||||||
$modName = $modules[$key];
|
$modName = $nom[$key];
|
||||||
if ($modName)
|
$objMod = $modules[$key];
|
||||||
|
|
||||||
|
// On affiche pas module si en version 'development' et que
|
||||||
|
// constante MAIN_SHOW_DEVELOPMENT_MODULES non définie
|
||||||
|
if ($objMod->version == 'development' && ! $conf->global->MAIN_SHOW_DEVELOPMENT_MODULES)
|
||||||
{
|
{
|
||||||
$objMod = new $modName($db);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$const_name = $objMod->const_name;
|
$const_name = $objMod->const_name;
|
||||||
$const_value = $objMod->const_config;
|
|
||||||
|
|
||||||
if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) {
|
if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) {
|
||||||
print "<tr class=\"liste_titre\">\n <td colspan=\"9\"></td>\n</tr>\n";
|
print "<tr class=\"liste_titre\">\n <td colspan=\"9\"></td>\n</tr>\n";
|
||||||
@ -261,7 +266,7 @@ foreach ($orders as $key => $value)
|
|||||||
print $objMod->getDbVersion();
|
print $objMod->getDbVersion();
|
||||||
print "</td>\n <td align=\"center\">";
|
print "</td>\n <td align=\"center\">";
|
||||||
|
|
||||||
if ($const_value == 1)
|
if ($conf->global->$const_name == 1)
|
||||||
{
|
{
|
||||||
print img_tick();
|
print img_tick();
|
||||||
}
|
}
|
||||||
@ -272,8 +277,7 @@ foreach ($orders as $key => $value)
|
|||||||
|
|
||||||
print "</td>\n <td align=\"center\">";
|
print "</td>\n <td align=\"center\">";
|
||||||
|
|
||||||
|
if ($conf->global->$const_name == 1)
|
||||||
if ($const_value == 1)
|
|
||||||
{
|
{
|
||||||
// Module actif
|
// Module actif
|
||||||
print "<a href=\"modules.php?id=".$objMod->numero."&action=reset&value=" . $modName . "&spe=" . $_GET["spe"] . "\">" . $langs->trans("Disable") . "</a></td>\n";
|
print "<a href=\"modules.php?id=".$objMod->numero."&action=reset&value=" . $modName . "&spe=" . $_GET["spe"] . "\">" . $langs->trans("Disable") . "</a></td>\n";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user