New: N'affiche pas les modules en version 'development'.
This commit is contained in:
parent
5a05c314f3
commit
30646d860d
@ -191,9 +191,12 @@ while (($file = readdir($handle))!==false)
|
|||||||
{
|
{
|
||||||
$j = 1000 + $i;
|
$j = 1000 + $i;
|
||||||
}
|
}
|
||||||
$modules[$i] = $modName;
|
|
||||||
$numero[$i] = $j;
|
$modules[$i] = $objMod;
|
||||||
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
|
||||||
|
$nom[$i] = $modName;
|
||||||
|
$numero[$i] = $j;
|
||||||
|
$orders[$i] = "$objMod->family"."_".$j; // Tri par famille puis numero module
|
||||||
$j++;
|
$j++;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
@ -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";
|
||||||
@ -233,7 +238,7 @@ foreach ($orders as $key => $value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if((!$objMod->special && !$_GET["spe"] ) or ($objMod->special && $_GET["spe"]))
|
if((!$objMod->special && !$_GET["spe"] ) or ($objMod->special && $_GET["spe"]))
|
||||||
{
|
{
|
||||||
$atleastoneforfamily=1;
|
$atleastoneforfamily=1;
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
@ -241,14 +246,14 @@ foreach ($orders as $key => $value)
|
|||||||
|
|
||||||
print " <td class=\"body\" valign=\"top\">";
|
print " <td class=\"body\" valign=\"top\">";
|
||||||
if ($family!=$oldfamily)
|
if ($family!=$oldfamily)
|
||||||
{
|
{
|
||||||
print "<div class=\"titre\">".$familylib[$family]."</div>";
|
print "<div class=\"titre\">".$familylib[$family]."</div>";
|
||||||
$oldfamily=$family;
|
$oldfamily=$family;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print ' <td valign="top" width="14" align="center">';
|
print ' <td valign="top" width="14" align="center">';
|
||||||
print $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
|
print $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
|
||||||
@ -261,20 +266,19 @@ 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();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print " ";
|
print " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
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";
|
||||||
|
|
||||||
@ -311,10 +315,10 @@ foreach ($orders as $key => $value)
|
|||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Module non actif
|
// Module non actif
|
||||||
print "<a href=\"modules.php?id=".$objMod->numero."&action=set&value=" . $modName . "&spe=" . $_GET["spe"] . "\">" . $langs->trans("Activate") . "</a></td>\n <td> </td>\n";
|
print "<a href=\"modules.php?id=".$objMod->numero."&action=set&value=" . $modName . "&spe=" . $_GET["spe"] . "\">" . $langs->trans("Activate") . "</a></td>\n <td> </td>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user