actually use uploaded file

This commit is contained in:
Uwe Steinmann 2015-06-12 12:56:17 +02:00
parent 34a7df9180
commit da7c04d250
2 changed files with 6 additions and 4 deletions

View File

@ -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;

View File

@ -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;