call hook 'approveDocument' after document has been approved or rejected

This commit is contained in:
Uwe Steinmann 2017-04-05 21:59:45 +02:00
parent ebc4a29505
commit cb6dbd0c8d

View File

@ -194,8 +194,13 @@ if ($_POST["approvalStatus"]==-1){
}
}
// TODO: if user os not owner send notification to owner
if(isset($GLOBALS['SEEDDMS_HOOKS']['approveDocument'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['approveDocument'] as $hookObj) {
if (method_exists($hookObj, 'postApproveDocument')) {
$hookObj->postApproveDocument(null, $content, S_REJECTED);
}
}
}
}
}else{
@ -241,7 +246,13 @@ if ($_POST["approvalStatus"]==-1){
}
}
// TODO: if user os not owner send notification to owner
if(isset($GLOBALS['SEEDDMS_HOOKS']['approveDocument'])) {
foreach($GLOBALS['SEEDDMS_HOOKS']['approveDocument'] as $hookObj) {
if (method_exists($hookObj, 'postApproveDocument')) {
$hookObj->postApproveDocument(null, $content, S_RELEASED);
}
}
}
}
}
}