From 0fcb012234b9f5b7d3fc67e6bb8b44d1144a29a6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 18 Apr 2010 11:48:12 +0000 Subject: [PATCH] Fix: allow underscore in module name --- htdocs/core/conf.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/conf.class.php b/htdocs/core/conf.class.php index b920774f506..785c5ff61b6 100644 --- a/htdocs/core/conf.class.php +++ b/htdocs/core/conf.class.php @@ -1,8 +1,8 @@ * Copyright (C) 2003 Xavier Dutoit - * Copyright (C) 2004-2009 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2006 Jean Heimburger * * This program is free software; you can redistribute it and/or modify @@ -129,7 +129,7 @@ class Conf //print 'xxx'.$params[0].'-'.$value; } // If this is constant for triggers activated by a module - if (preg_match('/^MAIN_MODULE_([A-Z]+)_TRIGGERS$/i',$key,$regs) && $value) + if (preg_match('/^MAIN_MODULE_([A-Z_]+)_TRIGGERS$/i',$key,$regs) && $value) { $modulename = strtolower($regs[1]); $this->triggers_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/triggers/'; @@ -162,7 +162,7 @@ class Conf $this->need_smarty[]=$module; } // If this is a module constant - if (preg_match('/^MAIN_MODULE_([A-Z]+)$/i',$key,$reg) && $value) + if (preg_match('/^MAIN_MODULE_([A-Z_]+)$/i',$key,$reg) && $value) { $module=strtolower($reg[1]); //print "Module ".$module." is enabled
\n";