Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Aug 10, 2011
1 parent 65b8d17 commit dca0e4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
6 changes: 4 additions & 2 deletions htdocs/core/class/hookmanager.class.php
Expand Up @@ -21,7 +21,7 @@
* \file htdocs/core/class/hookmanager.class.php
* \ingroup core
* \brief File of class to manage hooks
* \version $Id: hookmanager.class.php,v 1.3 2011/08/10 17:40:45 hregis Exp $
* \version $Id: hookmanager.class.php,v 1.4 2011/08/10 19:35:25 eldy Exp $
*/


Expand Down Expand Up @@ -51,7 +51,9 @@ function HookManager($DB)


/**
* Init array this->hooks with instantiated controler and/or dao
* Init array this->hooks with instantiated controler
* A hook is declared by a module by adding a constant MAIN_MODULE_MYMODULENAME_HOOKS
* with value nameofhookkey1:nameofhookkey2:...:nameofhookkeyn
* @param arraytype Array list of hooked tab/features. For example: thirdpartytab, ...
* @return int Always 1
*/
Expand Down
16 changes: 6 additions & 10 deletions htdocs/societe/soc.php
Expand Up @@ -25,7 +25,7 @@
* \file htdocs/societe/soc.php
* \ingroup societe
* \brief Third party card page
* \version $Id: soc.php,v 1.132 2011/08/10 22:47:35 eldy Exp $
* \version $Id: soc.php,v 1.131 2011/08/10 19:34:44 eldy Exp $
*/

require("../main.inc.php");
Expand Down Expand Up @@ -87,8 +87,7 @@
* Actions
*/

$parameters=array('socid'=>$socid);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
$reshook=$hookmanager->executeHooks('doActions',$action,$object,$socid); // Note that $action and $object may have been modified by some hooks


// ---------- start deprecated. Use hook to hook actions.
Expand Down Expand Up @@ -1000,8 +999,7 @@
}

// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('showInputFields',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
$reshook=$hookmanager->executeHooks('showInputFields',$action,$object); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{
foreach($extrafields->attribute_label as $key=>$label)
Expand Down Expand Up @@ -1428,8 +1426,7 @@
}

// Other attributes
$parameters=array();
$reshook=$hookmanager->executeHooks('showInputFields',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
$reshook=$hookmanager->executeHooks('showInputFields',$action,$object); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{
foreach($extrafields->attribute_label as $key=>$label)
Expand Down Expand Up @@ -1769,8 +1766,7 @@
}

// Other attributes
$parameters=array('socid'=>$socid);
$reshook=$hookmanager->executeHooks('showOutputFields',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
$reshook=$hookmanager->executeHooks('showOutputFields',$action,$object,$socid); // Note that $action and $object may have been modified by hook
if (empty($reshook))
{
foreach($extrafields->attribute_label as $key=>$label)
Expand Down Expand Up @@ -1959,5 +1955,5 @@

$db->close();

llxFooter('$Date: 2011/08/10 22:47:35 $ - $Revision: 1.132 $');
llxFooter('$Date: 2011/08/10 19:34:44 $ - $Revision: 1.131 $');
?>

0 comments on commit dca0e4c

Please sign in to comment.