mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +00:00
pass null as first argument to all hooks (will later be the controller)
This commit is contained in:
parent
727f93eafa
commit
ca17bc0c8c
|
@ -317,7 +317,7 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preAddDocument')) {
|
||||
$hookObj->preAddDocument(array('name'=>&$name, 'comment'=>&$comment));
|
||||
$hookObj->preAddDocument(null, array('name'=>&$name, 'comment'=>&$comment));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -345,7 +345,7 @@ for ($file_num=0;$file_num<count($_FILES["userfile"]["tmp_name"]);$file_num++){
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postAddDocument')) {
|
||||
$hookObj->postAddDocument($document);
|
||||
$hookObj->postAddDocument(null, $document);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ switch($command) {
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['addDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['addDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postAddDocument')) {
|
||||
$hookObj->postAddDocument($document);
|
||||
$hookObj->postAddDocument(null, $document);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ default:
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preSetExpires')) {
|
||||
$hookObj->preSetExpires(array('document'=>$document, 'expires'=>&$expires));
|
||||
$hookObj->preSetExpires(null, array('document'=>$document, 'expires'=>&$expires));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ $document->verifyLastestContentExpriry();
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['setExpires'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['setExpires'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postSetExpires')) {
|
||||
$hookObj->postSetExpires(array('document'=>$document, 'expires'=>$expires));
|
||||
$hookObj->postSetExpires(null, array('document'=>$document, 'expires'=>$expires));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ $workflow = $transition->getWorkflow();
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preTriggerWorkflowTransition')) {
|
||||
$hookObj->preTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
$hookObj->preTriggerWorkflowTransition(null, array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ if($version->triggerWorkflowTransition($user, $transition, $_POST["comment"])) {
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['triggerWorkflowTransition'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postTriggerWorkflowTransition')) {
|
||||
$hookObj->postTriggerWorkflowTransition(array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
$hookObj->postTriggerWorkflowTransition(null, array('version'=>$version, 'transition'=>$transition, 'comment'=>$_POST["comment"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'preUpdateDocument')) {
|
||||
$hookObj->preUpdateDocument(array('name'=>&$name, 'comment'=>&$comment));
|
||||
$hookObj->preUpdateDocument(null, array('name'=>&$name, 'comment'=>&$comment));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -254,7 +254,7 @@ if ($_FILES['userfile']['error'] == 0) {
|
|||
if(isset($GLOBALS['SEEDDMS_HOOKS']['updateDocument'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['updateDocument'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'postUpdateDocument')) {
|
||||
$hookObj->postUpdateDocument($document);
|
||||
$hookObj->postUpdateDocument(null, $document);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user