mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
actually use uploaded file
This commit is contained in:
parent
34a7df9180
commit
da7c04d250
|
@ -32,6 +32,7 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
|
|||
$approvaltype = $this->params['approvaltype'];
|
||||
$group = $this->params['group'];
|
||||
$comment = $this->params['comment'];
|
||||
$file = $this->params['file'];
|
||||
|
||||
/* Get the document id and name before removing the document */
|
||||
$docname = $document->getName();
|
||||
|
@ -43,13 +44,13 @@ class SeedDMS_Controller_ApproveDocument extends SeedDMS_Controller_Common {
|
|||
$result = $this->callHook('approveDocument', $content);
|
||||
if($result === null) {
|
||||
if ($approvaltype == "ind") {
|
||||
if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment)) {
|
||||
if(0 > $content->setApprovalByInd($user, $user, $approvalstatus, $comment, $file)) {
|
||||
$this->error = 1;
|
||||
$this->errormsg = "approval_update_failed";
|
||||
return false;
|
||||
}
|
||||
} elseif ($approvaltype == "grp") {
|
||||
if(0 > $content->setApprovalByGrp($group, $user, $approvalstatus, $comment)) {
|
||||
if(0 > $content->setApprovalByGrp($group, $user, $approvalstatus, $comment, $file)) {
|
||||
$this->error = 1;
|
||||
$this->errormsg = "approval_update_failed";
|
||||
return false;
|
||||
|
|
|
@ -32,6 +32,7 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
|
|||
$reviewtype = $this->params['reviewtype'];
|
||||
$group = $this->params['group'];
|
||||
$comment = $this->params['comment'];
|
||||
$file = $this->params['file'];
|
||||
|
||||
/* Get the document id and name before removing the document */
|
||||
$docname = $document->getName();
|
||||
|
@ -44,13 +45,13 @@ class SeedDMS_Controller_ReviewDocument extends SeedDMS_Controller_Common {
|
|||
if($result === null) {
|
||||
|
||||
if ($reviewtype == "ind") {
|
||||
if(0 > $content->setReviewByInd($user, $user, $reviewstatus, $comment)) {
|
||||
if(0 > $content->setReviewByInd($user, $user, $reviewstatus, $comment, $file)) {
|
||||
$this->error = 1;
|
||||
$this->errormsg = "review_update_failed";
|
||||
return false;
|
||||
}
|
||||
} elseif ($reviewtype == "grp") {
|
||||
if(0 > $content->setReviewByGrp($group, $user, $reviewstatus, $comment)) {
|
||||
if(0 > $content->setReviewByGrp($group, $user, $reviewstatus, $comment, $file)) {
|
||||
$this->error = 1;
|
||||
$this->errormsg = "review_update_failed";
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user