mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-10-14 13:01:33 +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();
|
$action = $transition->getAction();
|
||||||
$currentstate = $latestContent->getWorkflowState();
|
$currentstate = $latestContent->getWorkflowState();
|
||||||
$wkflogs = $latestContent->getWorkflowLog();
|
$wkflogs = $latestContent->getWorkflowLog();
|
||||||
$wkflog = array_shift($wkflogs);
|
/* Check if latest content is still in workflow, which should be
|
||||||
$workflow = $latestContent->getWorkflow();
|
* 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 />";
|
$msg = "The document is currently in state: ".$currentstate->getName()."<br />";
|
||||||
if($wkflog) {
|
if($wkflog) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user