Fix: Modules into core should never, by definition, activate hooks

(hooks are architecture solution for external module)
This commit is contained in:
Laurent Destailleur
2014-05-14 12:14:18 +02:00
parent ce82216879
commit 0027dc30f5
2 changed files with 18 additions and 17 deletions

View File

@@ -94,7 +94,7 @@ class modResource extends DolibarrModules
// Set this to relative path of css if module has its own css file // Set this to relative path of css if module has its own css file
//'css' => '/resource/css/resource.css.php', //'css' => '/resource/css/resource.css.php',
// Set here all hooks context managed by module // Set here all hooks context managed by module
'hooks' => array('actioncard','actioncommdao','resource_card','element_resource') // 'hooks' => array('actioncard','actioncommdao','resource_card','element_resource')
// Set here all workflow context managed by module // Set here all workflow context managed by module
//'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE')) //'workflow' => array('order' => array('WORKFLOW_ORDER_AUTOCREATE_INVOICE'))
); );

View File

@@ -23,6 +23,7 @@
/** /**
* Actions class file for resources * Actions class file for resources
* *
* TODO Remove this class and replace a method into commonobject
*/ */
class ActionsResource class ActionsResource
{ {
@@ -44,10 +45,12 @@ class ActionsResource
/** /**
* doActions for resource module * doActions for resource module
* *
* @param array $parameters parameters * @param array $parameters parameters
* @param Object $object object * @param Object &$object object
* @param string $action action * @param string &$action action
* @return void
*/ */
/* Why a hook action ? TODO Remove this class and replace a method into commonobject
function doActions($parameters, &$object, &$action) function doActions($parameters, &$object, &$action)
{ {
global $langs,$user; global $langs,$user;
@@ -160,8 +163,6 @@ class ActionsResource
} }
} }
} }
} }
}*/
}
} }