Fix: rename method

This commit is contained in:
Regis Houssin 2012-03-02 14:51:16 +01:00
parent 88ede7d951
commit 9301def08d
29 changed files with 33 additions and 33 deletions

View File

@ -450,7 +450,7 @@ class Adherent extends CommonObject
// Actions on extra fields (by external module)
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('memberdao'));
$hookmanager->initHooks(array('memberdao'));
$parameters=array('id'=>$this->id);
$action='';
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -89,7 +89,7 @@ if ($rowid)
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('membercard'));
$hookmanager->initHooks(array('membercard'));
/*

View File

@ -63,7 +63,7 @@ $pagenext = $page + 1;
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('admin'));
$hookmanager->initHooks(array('admin'));
// Thi page is a generic page to edit dictionnaries
// Put here delacaration of dictionnaries properties

View File

@ -47,7 +47,7 @@ $mesg=GETPOST('mesg');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('propalcard'));
$hookmanager->initHooks(array('propalcard'));
/*
* Actions

View File

@ -88,7 +88,7 @@ $result = restrictedArea($user, $module, $objectid, $dbtable);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('propalcard'));
$hookmanager->initHooks(array('propalcard'));

View File

@ -925,7 +925,7 @@ class Commande extends CommonObject
// Actions hooked (by external module)
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('orderdao'));
$hookmanager->initHooks(array('orderdao'));
$parameters=array('objFrom'=>$object);
$action='';

View File

@ -68,7 +68,7 @@ $result=restrictedArea($user,'commande',$id,'');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('ordercard'));
$hookmanager->initHooks(array('ordercard'));
/******************************************************************************/

View File

@ -80,7 +80,7 @@ $object=new Facture($db);
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('invoicecard'));
$hookmanager->initHooks(array('invoicecard'));
/*

View File

@ -653,7 +653,7 @@ class Facture extends CommonObject
// Actions hooked (by external module)
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('invoicedao'));
$hookmanager->initHooks(array('invoicedao'));
$parameters=array('objFrom'=>$object);
$action='';

View File

@ -64,7 +64,7 @@ $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', '',
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('contactcard'));
$hookmanager->initHooks(array('contactcard'));
/*

View File

@ -58,14 +58,14 @@ class HookManager
* First, a hook is declared by a module by adding a constant MAIN_MODULE_MYMODULENAME_HOOKS
* with value 'nameofcontext1:nameofcontext2:...' into $this->const of module descriptor file.
* This make conf->hooks_modules loaded with an entry ('modulename'=>array(nameofcontext1,nameofcontext2,...))
* When callHooks function is called, with callHooks(list_of_contexts), an array this->hooks is defined with instance of controler
* When initHooks function is called, with initHooks(list_of_contexts), an array this->hooks is defined with instance of controler
* class found into file /mymodule/class/actions_mymodule.class.php (if module has declared the context as a managed context).
* Then when a hook is executeHook('aMethod'...) is called, the method aMethod found into class will be executed.
*
* @param array $arraycontext Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
* @return int Always 1
*/
function callHooks($arraycontext)
function initHooks($arraycontext)
{
global $conf;

View File

@ -303,7 +303,7 @@ class pdf_edison extends ModelePDFCommandes
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -412,7 +412,7 @@ class pdf_einstein extends ModelePDFCommandes
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -417,7 +417,7 @@ class pdf_crabe extends ModelePDFFactures
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -305,7 +305,7 @@ class pdf_oursin extends ModelePDFFactures
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -398,7 +398,7 @@ class pdf_azur extends ModelePDFPropales
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -398,7 +398,7 @@ class pdf_jaune extends ModelePDFPropales
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -403,7 +403,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -411,7 +411,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
}
$hookmanager->callHooks(array('pdfgeneration'));
$hookmanager->initHooks(array('pdfgeneration'));
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks

View File

@ -62,7 +62,7 @@ $result = restrictedArea($user, 'commande_fournisseur', $id,'');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('ordersuppliercard'));
$hookmanager->initHooks(array('ordersuppliercard'));
$mesg='';

View File

@ -53,7 +53,7 @@ $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture');
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('invoicesuppliercard'));
$hookmanager->initHooks(array('invoicesuppliercard'));
$object=new FactureFournisseur($db);

View File

@ -35,7 +35,7 @@ if (! isset($_GET["mainmenu"])) $_GET["mainmenu"]="home";
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('index'));
$hookmanager->initHooks(array('index'));
/*

View File

@ -586,7 +586,7 @@ if (! defined('NOLOGIN'))
$action='';
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('login'));
$hookmanager->initHooks(array('login'));
$parameters=array('dol_authmode'=>$dol_authmode);
$reshook=$hookmanager->executeHooks('afterLogin',$parameters,$user,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) $error++;
@ -1054,7 +1054,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
}
$hookmanager->callHooks(array('toprightmenu'));
$hookmanager->initHooks(array('toprightmenu'));
$toprightmenu='';
@ -1310,7 +1310,7 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
}
$hookmanager->callHooks(array('searchform','leftblock','toprightmenu'));
$hookmanager->initHooks(array('searchform','leftblock','toprightmenu'));
if ($conf->use_javascript_ajax && $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
else print '<td class="vmenu" valign="top">';

View File

@ -562,7 +562,7 @@ class Product extends CommonObject
// Actions on extra fields (by external module or standard code)
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('productdao'));
$hookmanager->initHooks(array('productdao'));
$parameters=array(); $action='delete';
$reshook=$hookmanager->executeHooks('deleteProduct',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($hookmanager->error))

View File

@ -73,7 +73,7 @@ $result=restrictedArea($user,'produit|service',$fieldvalue,'product&product','',
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('productcard'));
$hookmanager->initHooks(array('productcard'));

View File

@ -57,7 +57,7 @@ $result=restrictedArea($user,'produit|service&fournisseur',$fieldvalue,'product&
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('pricesuppliercard'));
$hookmanager->initHooks(array('pricesuppliercard'));
$sortfield = GETPOST("sortfield",'alpha');

View File

@ -40,7 +40,7 @@ if (empty($dolibarr_main_demo)) accessforbidden('Parameter dolibarr_main_demo mu
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('demo'));
$hookmanager->initHooks(array('demo'));
$demoprofiles=array(
array('default'=>'-1', 'key'=>'profdemofun','label'=>'DemoFundation',

View File

@ -542,7 +542,7 @@ class Societe extends CommonObject
// Actions on extra fields (by external module or standard code)
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('thirdpartydao'));
$hookmanager->initHooks(array('thirdpartydao'));
$parameters=array('socid'=>$this->id);
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (empty($reshook))
@ -893,7 +893,7 @@ class Societe extends CommonObject
// Additionnal action by hooks
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db);
$hookmanager->callHooks(array('thirdpartydao'));
$hookmanager->initHooks(array('thirdpartydao'));
$parameters=array(); $action='delete';
$reshook=$hookmanager->executeHooks('deleteThirdparty',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
if (! empty($hookmanager->error))

View File

@ -71,7 +71,7 @@ $result = restrictedArea($user, 'societe', $socid, '&societe', '', '', '', $objc
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($db);
$hookmanager->callHooks(array('thirdpartycard'));
$hookmanager->initHooks(array('thirdpartycard'));
/*