From aeed5ac59746a7071c35c1a7a814360af31f134c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@users.sourceforge.net> Date: Sun, 12 Jun 2011 01:30:58 +0000 Subject: [PATCH] Work on dolimed package --- htdocs/install/etape5.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/install/etape5.php b/htdocs/install/etape5.php index 9a103dc7d1b..5dd4fef9663 100644 --- a/htdocs/install/etape5.php +++ b/htdocs/install/etape5.php @@ -221,15 +221,21 @@ if ($action == "set" || preg_match('/upgrade/i',$action)) // This works only for module store into root directory. Does not work for alternate modules. if (! empty($force_install_module)) { + if (! defined('DOL_DOCUMENT_ROOT') && ! empty($dolibarr_main_document_root)) define('DOL_DOCUMENT_ROOT',$dolibarr_main_document_root); + if (! defined('DOL_DOCUMENT_ROOT_ALT') && ! empty($dolibarr_main_document_root_alt)) define('DOL_DOCUMENT_ROOT_ALT',$dolibarr_main_document_root_alt); + $tmparray=explode(',',$force_install_module); foreach ($tmparray as $modtoactivate) { $modtoactivatenew=preg_replace('/\.class\.php$/i','',$modtoactivate); $file=$modtoactivatenew.'.class.php'; dolibarr_install_syslog('install/etape5.php Activate module file='.$file); - include_once(DOL_DOCUMENT_ROOT ."/includes/modules/".$file); - $objMod = new $modtoactivatenew($db); - $result=$objMod->init(); + $res=dol_include_once("/includes/modules/".$file); + //print 'x'.dol_buildpath("/includes/modules/".$file);exit; + + $res=Activate($modtoactivatenew,1); + //$objMod = new $modtoactivatenew($db); + //$result=$objMod->init(); if (! $result) print 'ERROR in activating module file='.$file; } } -- GitLab