mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
pass content not document to hooks
This commit is contained in:
parent
312e619fa6
commit
c460c9e674
|
@ -37,10 +37,10 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
|
||||||
$docname = $document->getName();
|
$docname = $document->getName();
|
||||||
$documentid = $document->getID();
|
$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($result === null) {
|
||||||
if ($approvaltype == "ind") {
|
if ($approvaltype == "ind") {
|
||||||
if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment)) {
|
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
|
/* Check to see if the overall status for the document version needs to be
|
||||||
* updated.
|
* updated.
|
||||||
*/
|
*/
|
||||||
$result = $this->callHook('approveUpdateDocumentStatus', $document);
|
$result = $this->callHook('approveUpdateDocumentStatus', $content);
|
||||||
if($result === null) {
|
if($result === null) {
|
||||||
/* If document was rejected, set the document status to S_REJECTED right away */
|
/* If document was rejected, set the document status to S_REJECTED right away */
|
||||||
if ($approvalstatus == -1){
|
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;
|
return true;
|
||||||
|
|
|
@ -37,10 +37,10 @@ class SeedDMS_Controller_ReceiptDocument extends SeedDMS_Controller_Common {
|
||||||
$docname = $document->getName();
|
$docname = $document->getName();
|
||||||
$documentid = $document->getID();
|
$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($result === null) {
|
||||||
|
|
||||||
if ($receipttype == "ind") {
|
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;
|
return true;
|
||||||
|
|
|
@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
|
||||||
$docname = $document->getName();
|
$docname = $document->getName();
|
||||||
$documentid = $document->getID();
|
$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($result === null) {
|
||||||
|
|
||||||
if ($reviewtype == "ind") {
|
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
|
/* Check to see if the overall status for the document version needs to be
|
||||||
* updated.
|
* updated.
|
||||||
*/
|
*/
|
||||||
$result = $this->callHook('reviewUpdateDocumentStatus', $document);
|
$result = $this->callHook('reviewUpdateDocumentStatus', $content);
|
||||||
if($result === null) {
|
if($result === null) {
|
||||||
if ($reviewstatus == -1){
|
if ($reviewstatus == -1){
|
||||||
if($content->setStatus(S_REJECTED,$comment,$user)) {
|
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;
|
return true;
|
||||||
|
|
|
@ -37,10 +37,10 @@ class SeedDMS_Controller_ReviseDocument extends SeedDMS_Controller_Common {
|
||||||
$docname = $document->getName();
|
$docname = $document->getName();
|
||||||
$documentid = $document->getID();
|
$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($result === null) {
|
||||||
|
|
||||||
if ($revisiontype == "ind") {
|
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
|
/* Check to see if the overall status for the document version needs to be
|
||||||
* updated.
|
* updated.
|
||||||
*/
|
*/
|
||||||
$result = $this->callHook('reviseUpdateDocumentStatus', $document);
|
$result = $this->callHook('reviseUpdateDocumentStatus', $content);
|
||||||
if($result === null) {
|
if($result === null) {
|
||||||
if ($revisionstatus == -1){
|
if ($revisionstatus == -1){
|
||||||
if($content->setStatus(S_REJECTED,$comment,$user)) {
|
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;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user