mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-16 22:41:30 +01:00
Fix: Modules into core should never, by definition, activate hooks
(hooks are architecture solution for external module)
This commit is contained in:
@@ -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'))
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user