Skip to content
Snippets Groups Projects
Commit d6205440 authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: nom de classe et constante était différent

parent a54e177b
Branches
Tags
No related merge requests found
...@@ -176,6 +176,7 @@ if ($handle) ...@@ -176,6 +176,7 @@ if ($handle)
if (eregi('^(mod_.*)\.php$',$file,$reg)) if (eregi('^(mod_.*)\.php$',$file,$reg))
{ {
$file = $reg[1]; $file = $reg[1];
$className = substr($file,4);
require_once($dir.$file.".php"); require_once($dir.$file.".php");
...@@ -190,13 +191,13 @@ if ($handle) ...@@ -190,13 +191,13 @@ if ($handle)
print '<td nowrap="nowrap">'.$module->getExample()."</td>\n"; print '<td nowrap="nowrap">'.$module->getExample()."</td>\n";
print '<td align="center">'; print '<td align="center">';
if ($conf->global->FICHEINTER_ADDON == $file) if ($conf->global->FICHEINTER_ADDON == $className)
{ {
print img_tick($langs->trans("Activated")); print img_tick($langs->trans("Activated"));
} }
else else
{ {
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$file.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>'; print '<a href="'.$_SERVER["PHP_SELF"].'?action=setmod&amp;value='.$className.'" alt="'.$langs->trans("Default").'">'.$langs->trans("Default").'</a>';
} }
print '</td>'; print '</td>';
......
...@@ -32,9 +32,9 @@ require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php"); ...@@ -32,9 +32,9 @@ require_once(DOL_DOCUMENT_ROOT."/fichinter/fichinter.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php"); require_once(DOL_DOCUMENT_ROOT."/includes/modules/fichinter/modules_fichinter.php");
require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php"); require_once(DOL_DOCUMENT_ROOT."/lib/fichinter.lib.php");
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php"); if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/project.class.php");
if (defined("FICHEINTER_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/".FICHEINTER_ADDON.".php")) if (defined("FICHEINTER_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/mod_".FICHEINTER_ADDON.".php"))
{ {
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/".FICHEINTER_ADDON.".php"); require_once(DOL_DOCUMENT_ROOT ."/includes/modules/fichinter/mod_".FICHEINTER_ADDON.".php");
} }
$langs->load("companies"); $langs->load("companies");
...@@ -369,7 +369,7 @@ if ($_GET["action"] == 'create') ...@@ -369,7 +369,7 @@ if ($_GET["action"] == 'create')
$result=$ficheinter->fetch($fichinterid); $result=$ficheinter->fetch($fichinterid);
$obj = $conf->global->FICHEINTER_ADDON; $obj = $conf->global->FICHEINTER_ADDON;
$file = $obj.".php"; $obj = "mod_".$obj;
$modFicheinter = new $obj; $modFicheinter = new $obj;
$numpr = $modFicheinter->getNextValue($societe,$ficheinter); $numpr = $modFicheinter->getNextValue($societe,$ficheinter);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment