check for workflow state != null

This commit is contained in:
Uwe Steinmann 2021-06-01 10:52:00 +02:00
parent 6de32dcc2c
commit 3366d9a149

View File

@ -49,6 +49,7 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style {
$wkflog = $latestContent->getWorkflowLog();
$workflow = $latestContent->getWorkflow();
if($currentstate) {
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
if($wkflog) {
foreach($wkflog as $entry) {
@ -61,6 +62,9 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style {
$msg .= getReadableDuration((time()-$enterts))." ago.<br />";
}
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
} else {
$msg = getMLText('workflow_in_unknown_state');
}
$this->infoMsg($msg);
$this->contentContainerStart();