mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 17:44:56 +00:00
propperly get workflow log
This commit is contained in:
parent
6557d2edc9
commit
995f7a5bad
|
@ -66,8 +66,16 @@ $(document).ready(function() {
|
|||
$action = $transition->getAction();
|
||||
$currentstate = $latestContent->getWorkflowState();
|
||||
$wkflogs = $latestContent->getWorkflowLog();
|
||||
$wkflog = array_shift($wkflogs);
|
||||
$workflow = $latestContent->getWorkflow();
|
||||
/* Check if latest content is still in workflow, which should be
|
||||
* always the case, otherwise this code would be executed.
|
||||
* In that case the returned log is just a list of entries for the
|
||||
* current workflow. If the document was not in a workflow, then the
|
||||
* log entries for all workflows of this content will be returned
|
||||
*/
|
||||
if($workflow = $latestContent->getWorkflow())
|
||||
$wkflog = $wkflogs;
|
||||
else
|
||||
$wkflog = array_shift($wkflogs);
|
||||
|
||||
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
|
||||
if($wkflog) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user