pass content not document to hooks

This commit is contained in:
Uwe Steinmann 2015-06-01 17:34:52 +02:00
parent 312e619fa6
commit c460c9e674
4 changed files with 15 additions and 15 deletions

View File

@ -37,10 +37,10 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
$docname = $document->getName();
$documentid = $document->getID();
if(!$this->callHook('preApproveDocument', $document)) {
if(!$this->callHook('preApproveDocument', $content)) {
}
$result = $this->callHook('approveDocument', $document);
$result = $this->callHook('approveDocument', $content);
if($result === null) {
if ($approvaltype == "ind") {
if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment)) {
@ -60,7 +60,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
/* Check to see if the overall status for the document version needs to be
* updated.
*/
$result = $this->callHook('approveUpdateDocumentStatus', $document);
$result = $this->callHook('approveUpdateDocumentStatus', $content);
if($result === null) {
/* If document was rejected, set the document status to S_REJECTED right away */
if ($approvalstatus == -1){
@ -94,7 +94,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
}
}
if(!$this->callHook('postApproveDocument', $document)) {
if(!$this->callHook('postApproveDocument', $content)) {
}
return true;

View File

@ -37,10 +37,10 @@ class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common {
$docname = $document->getName();
$documentid = $document->getID();
if(!$this->callHook('preReceiptDocument', $document)) {
if(!$this->callHook('preReceiptDocument', $content)) {
}
$result = $this->callHook('receiptDocument', $document);
$result = $this->callHook('receiptDocument', $content);
if($result === null) {
if ($receipttype == "ind") {
@ -58,7 +58,7 @@ class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common {
}
}
if(!$this->callHook('postReceiptDocument', $document)) {
if(!$this->callHook('postReceiptDocument', $content)) {
}
return true;

View File

@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
$docname = $document->getName();
$documentid = $document->getID();
if(!$this->callHook('preReviewDocument', $document)) {
if(!$this->callHook('preReviewDocument', $content)) {
}
$result = $this->callHook('reviewDocument', $document);
$result = $this->callHook('reviewDocument', $content);
if($result === null) {
if ($reviewtype == "ind") {
@ -61,7 +61,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
/* Check to see if the overall status for the document version needs to be
* updated.
*/
$result = $this->callHook('reviewUpdateDocumentStatus', $document);
$result = $this->callHook('reviewUpdateDocumentStatus', $content);
if($result === null) {
if ($reviewstatus == -1){
if($content->setStatus(S_REJECTED,$comment,$user)) {
@ -119,7 +119,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
}
}
if(!$this->callHook('postReviewDocument', $document)) {
if(!$this->callHook('postReviewDocument', $content)) {
}
return true;

View File

@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common {
$docname = $document->getName();
$documentid = $document->getID();
if(!$this->callHook('preReviseDocument', $document)) {
if(!$this->callHook('preReviseDocument', $content)) {
}
$result = $this->callHook('reviseDocument', $document);
$result = $this->callHook('reviseDocument', $content);
if($result === null) {
if ($revisiontype == "ind") {
@ -61,7 +61,7 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common {
/* Check to see if the overall status for the document version needs to be
* updated.
*/
$result = $this->callHook('reviseUpdateDocumentStatus', $document);
$result = $this->callHook('reviseUpdateDocumentStatus', $content);
if($result === null) {
if ($revisionstatus == -1){
if($content->setStatus(S_REJECTED,$comment,$user)) {
@ -103,7 +103,7 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common {
}
}
if(!$this->callHook('postReviseDocument', $document)) {
if(!$this->callHook('postReviseDocument', $content)) {
}
return true;