diff --git a/views/bootstrap/class.RewindWorkflow.php b/views/bootstrap/class.RewindWorkflow.php index 3d2a4c63b..09b142c69 100644 --- a/views/bootstrap/class.RewindWorkflow.php +++ b/views/bootstrap/class.RewindWorkflow.php @@ -49,26 +49,29 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style { $wkflog = $latestContent->getWorkflowLog(); $workflow = $latestContent->getWorkflow(); - $msg = "The document is currently in state: ".$currentstate->getName()."
"; - if($wkflog) { - foreach($wkflog as $entry) { - if($entry->getTransition()->getNextState()->getID() == $currentstate->getID()) { - $enterdate = $entry->getDate(); - $enterts = makeTsFromLongDate($enterdate); + if($currentstate) { + $msg = "The document is currently in state: ".$currentstate->getName()."
"; + if($wkflog) { + foreach($wkflog as $entry) { + if($entry->getTransition()->getNextState()->getID() == $currentstate->getID()) { + $enterdate = $entry->getDate(); + $enterts = makeTsFromLongDate($enterdate); + } } + $msg .= "The state was entered at ".$enterdate." which was "; + $msg .= getReadableDuration((time()-$enterts))." ago.
"; } - $msg .= "The state was entered at ".$enterdate." which was "; - $msg .= getReadableDuration((time()-$enterts))." ago.
"; + $msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec."; + } else { + $msg = getMLText('workflow_in_unknown_state'); } - $msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec."; $this->infoMsg($msg); - $this->contentContainerStart(); // Display the Workflow form. $this->rowStart(); $this->columnStart(4); ?> -

+ warningMsg(getMLText("rewind_workflow_warning")); ?>
@@ -85,7 +88,6 @@ class SeedDMS_View_RewindWorkflow extends SeedDMS_Theme_Style { columnEnd(); $this->rowEnd(); - $this->contentContainerEnd(); if($wkflog) { echo "";