diff --git a/SeedDMS_Core/Core/inc.ClassDocument.php b/SeedDMS_Core/Core/inc.ClassDocument.php index 95be4c001..f09510b61 100644 --- a/SeedDMS_Core/Core/inc.ClassDocument.php +++ b/SeedDMS_Core/Core/inc.ClassDocument.php @@ -2794,6 +2794,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ unset($this->_workflow); // force to be reloaded from DB $hasworkflow = $this->getWorkflow() ? true : false; + /* $pendingReview will be set when there are still open reviews */ $pendingReview=false; unset($this->_reviewStatus); // force to be reloaded from DB $reviewStatus=$this->getReviewStatus(); @@ -2805,6 +2806,8 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } } + + /* $pendingApproval will be set when there are still open approvals */ $pendingApproval=false; unset($this->_approvalStatus); // force to be reloaded from DB $approvalStatus=$this->getApprovalStatus(); @@ -2817,7 +2820,7 @@ class SeedDMS_Core_DocumentContent extends SeedDMS_Core_Object { /* {{{ */ } } - /* First check for a running workflow, review, approval. */ + /* First check for a running workflow or open reviews or approvals. */ if ($hasworkflow) $this->setStatus(S_IN_WORKFLOW,$msg,$user); elseif ($pendingReview) $this->setStatus(S_DRAFT_REV,$msg,$user); elseif ($pendingApproval) $this->setStatus(S_DRAFT_APP,$msg,$user);