mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
check for workflow state != null
This commit is contained in:
parent
6de32dcc2c
commit
3366d9a149
|
@ -49,18 +49,22 @@ class SeedDMS_View_RemoveWorkflowFromDocument extends SeedDMS_Theme_Style {
|
|||
$wkflog = $latestContent->getWorkflowLog();
|
||||
$workflow = $latestContent->getWorkflow();
|
||||
|
||||
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
|
||||
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()."<br />";
|
||||
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.<br />";
|
||||
}
|
||||
$msg .= "The state was entered at ".$enterdate." which was ";
|
||||
$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');
|
||||
}
|
||||
$msg .= "The document may stay in this state for ".$currentstate->getMaxTime()." sec.";
|
||||
$this->infoMsg($msg);
|
||||
|
||||
$this->contentContainerStart();
|
||||
|
|
Loading…
Reference in New Issue
Block a user