Bugfix in regexp to fins available triggers

.php replaced by .php$ if not ~ files are used
This commit is contained in:
Rodolphe Quiedeville 2008-09-04 10:03:05 +00:00
parent 0446c3da41
commit ab4a70167a

View File

@ -63,7 +63,7 @@ class Interfaces
while (($file = readdir($handle))!==false) while (($file = readdir($handle))!==false)
{ {
if (is_readable($this->dir."/".$file) && eregi('^interface_([^_]+)_(.+)\.class\.php',$file,$reg)) if (is_readable($this->dir."/".$file) && eregi('^interface_([^_]+)_(.+)\.class\.php$',$file,$reg))
{ {
$nbfile++; $nbfile++;
@ -95,7 +95,7 @@ class Interfaces
dolibarr_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO); dolibarr_syslog("Interfaces::run_triggers Triggers for file '".$file."' need module to be enabled",LOG_INFO);
continue; continue;
} }
dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
include_once($this->dir."/".$file); include_once($this->dir."/".$file);
$objMod = new $modName($this->db); $objMod = new $modName($this->db);
if ($objMod) if ($objMod)