Fix: Evite erreur si module numrotation facture install avec rep sans fichier
This commit is contained in:
parent
dedb6206de
commit
cfb4537850
@ -181,48 +181,49 @@ while (($file = readdir($handle))!==false)
|
|||||||
{
|
{
|
||||||
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
if (is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
|
||||||
{
|
{
|
||||||
$var = !$var;
|
|
||||||
print '<tr '.$bc[$var].'><td width="100">';
|
|
||||||
echo "$file";
|
|
||||||
print "</td><td>\n";
|
|
||||||
|
|
||||||
$filebis = $file."/".$file.".modules.php";
|
$filebis = $file."/".$file.".modules.php";
|
||||||
|
if (is_readable($dir.$filebis))
|
||||||
|
{
|
||||||
|
$var = !$var;
|
||||||
|
print '<tr '.$bc[$var].'><td width="100">';
|
||||||
|
echo "$file";
|
||||||
|
print "</td><td>\n";
|
||||||
|
|
||||||
// Chargement de la classe de numérotation
|
// Chargement de la classe de numérotation
|
||||||
$classname = "mod_facture_".$file;
|
require_once($dir.$filebis);
|
||||||
require_once($dir.$filebis);
|
$classname = "mod_facture_".$file;
|
||||||
|
$module = new $classname($db);
|
||||||
|
print $module->info();
|
||||||
|
|
||||||
$module = new $classname($db);
|
print '</td>';
|
||||||
print $module->info();
|
|
||||||
|
|
||||||
print '</td>';
|
// Affiche example
|
||||||
|
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
|
||||||
|
|
||||||
// Affiche example
|
print '<td align="center">';
|
||||||
print '<td nowrap="nowrap">'.$module->getExample().'</td>';
|
if ($conf->global->FACTURE_ADDON == "$file")
|
||||||
|
{
|
||||||
|
print img_tick($langs->trans("Activated"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
// Info
|
||||||
if ($conf->global->FACTURE_ADDON == "$file")
|
$htmltooltip='';
|
||||||
{
|
$nextval=$module->getNextValue();
|
||||||
print img_tick($langs->trans("Activated"));
|
if ($nextval != $langs->trans("NotAvailable"))
|
||||||
}
|
{
|
||||||
else
|
$htmltooltip='<b>'.$langs->trans("NextValue").'</b>: '.$nextval;
|
||||||
{
|
}
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
|
print '<td align="center" '.$html->tooltip_properties($htmltooltip).'>';
|
||||||
}
|
print ($htmltooltip?img_help(0):'');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Info
|
print "</tr>\n";
|
||||||
$htmltooltip='';
|
}
|
||||||
$nextval=$module->getNextValue();
|
|
||||||
if ($nextval != $langs->trans("NotAvailable"))
|
|
||||||
{
|
|
||||||
$htmltooltip='<b>'.$langs->trans("NextValue").'</b>: '.$nextval;
|
|
||||||
}
|
|
||||||
print '<td align="center" '.$html->tooltip_properties($htmltooltip).'>';
|
|
||||||
print ($htmltooltip?img_help(0):'');
|
|
||||||
print '</td>';
|
|
||||||
|
|
||||||
print "</tr>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user