2
0
forked from Wavyzz/dolibarr

More comments

This commit is contained in:
Laurent Destailleur
2011-07-01 23:05:39 +00:00
parent 795cb3c899
commit 5c1a13f95e
2 changed files with 12 additions and 9 deletions

View File

@@ -22,7 +22,7 @@
* \file htdocs/core/class/commonobject.class.php * \file htdocs/core/class/commonobject.class.php
* \ingroup core * \ingroup core
* \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...) * \brief File of parent class of all other business classes (invoices, contracts, proposals, orders, ...)
* \version $Id: commonobject.class.php,v 1.142 2011/07/01 16:58:09 hregis Exp $ * \version $Id: commonobject.class.php,v 1.143 2011/07/01 23:05:39 eldy Exp $
*/ */
@@ -1431,8 +1431,8 @@ class CommonObject
/** /**
* Instantiate hooks of thirdparty module * Init array this->hooks with instantiated controler and/or dao
* @param $type Type of hook * @param arraytype Array list of hooked tab/features. For example: thirdpartytab, ...
*/ */
function callHooks($arraytype) function callHooks($arraytype)
{ {
@@ -1458,9 +1458,11 @@ class CommonObject
$this->hooks[$i]['type']=$type; $this->hooks[$i]['type']=$type;
// Include actions class (controller) // Include actions class (controller)
//print 'include '.$path.$actionfile."\n";
$resaction=dol_include_once($path.$actionfile); $resaction=dol_include_once($path.$actionfile);
// Include dataservice class (model) // Include dataservice class (model)
//print 'include '.$path.$daofile."\n";
$resdao=dol_include_once($path.$daofile); $resdao=dol_include_once($path.$daofile);
// Instantiate actions class (controller) // Instantiate actions class (controller)
@@ -1471,6 +1473,7 @@ class CommonObject
$this->hooks[$i]['modules'][$objModule->module_number] = $objModule; $this->hooks[$i]['modules'][$objModule->module_number] = $objModule;
} }
// FIXME storing dao is useless here. It's goal of controller to known which dao to manage
if ($resdao) if ($resdao)
{ {
// Instantiate dataservice class (model) // Instantiate dataservice class (model)

View File

@@ -25,7 +25,7 @@
* \ingroup core * \ingroup core
* \brief Fichier de la classe de stockage de la config courante * \brief Fichier de la classe de stockage de la config courante
* \remarks La config est stockee dans le fichier conf/conf.php * \remarks La config est stockee dans le fichier conf/conf.php
* \version $Id$ * \version $Id: conf.class.php,v 1.59 2011/07/01 23:06:06 eldy Exp $
*/ */
@@ -153,7 +153,7 @@ class Conf
$modulename = strtolower($reg[1]); $modulename = strtolower($reg[1]);
$this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/'; $this->login_method_modules[] = DOL_DOCUMENT_ROOT.'/'.$modulename.'/inc/login/';
} }
// If this is constant for hook activated by a module // If this is constant for hook activated by a module. Value is list of hooked tabs separated with :
elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg)) elseif (preg_match('/^MAIN_MODULE_([A-Z_]+)_HOOKS$/i',$key,$reg))
{ {
$modulename = strtolower($reg[1]); $modulename = strtolower($reg[1]);