From 7f16340a2645345cb3f29f1cbe15b825a39dc595 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Mon, 22 Apr 2024 17:47:11 +0200 Subject: [PATCH] fix adding workflow log --- utils/xmldump.php | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/utils/xmldump.php b/utils/xmldump.php index 5f993d227..ec84a1689 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -203,7 +203,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ if($attributes = $folder->getAttributes()) { foreach($attributes as $attribute) { $attrdef = $attribute->getAttributeDefinition(); - echo $indent." getID()."\">".wrapWithCData($attribute->getValue())."\n"; + echo $indent." getID()."\">".wrapWithCData($attribute->getValueAsString())."\n"; } } $notifications = $folder->getNotifyList(); @@ -278,7 +278,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ if($attributes = $document->getAttributes()) { foreach($attributes as $attribute) { $attrdef = $attribute->getAttributeDefinition(); - echo $indent." getID()."\">".wrapWithCData($attribute->getValue())."\n"; + echo $indent." getID()."\">".wrapWithCData($attribute->getValueAsString())."\n"; } } @@ -335,7 +335,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ if($attributes = $version->getAttributes()) { foreach($attributes as $attribute) { $attrdef = $attribute->getAttributeDefinition(); - echo $indent." getID()."\">".wrapWithCData($attribute->getValue())."\n"; + echo $indent." getID()."\">".wrapWithCData($attribute->getValueAsString())."\n"; } } if($statuslog = $version->getStatusLog()) { @@ -371,18 +371,23 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ $workflowstate = $version->getWorkflowState(); echo $indent." getID()."\" state=\"".$workflowstate->getID()."\">\n"; } - $wkflogs = $version->getWorkflowLog(); - if($wkflogs) { + if($workflow) + $wkfalllogs[$workflow->getId()] = $version->getWorkflowLog(); + else + $wkfalllogs = $version->getWorkflowLog(); + if($wkfalllogs) { echo $indent." \n"; - foreach($wkflogs as $wklog) { - echo $indent." \n"; - echo $indent." ".$wklog->getDate()."\n"; - echo $indent." ".$wklog->getWorkflow()->getID()."\n"; - echo $indent." ".$wklog->getTransition()->getID()."\n"; - $loguser = $wklog->getUser(); - echo $indent." ".$loguser->getID()."\n"; - echo $indent." ".wrapWithCData($wklog->getComment())."\n"; - echo $indent." \n"; + foreach($wkfalllogs as $wkflogs) { + foreach($wkflogs as $wklog) { + echo $indent." \n"; + echo $indent." ".$wklog->getDate()."\n"; + echo $indent." ".$wklog->getWorkflow()->getID()."\n"; + echo $indent." ".$wklog->getTransition()->getID()."\n"; + $loguser = $wklog->getUser(); + echo $indent." ".$loguser->getID()."\n"; + echo $indent." ".wrapWithCData($wklog->getComment())."\n"; + echo $indent." \n"; + } } echo $indent." \n"; } @@ -470,11 +475,11 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ } /* }}} */ include($myincpath."/inc/inc.Settings.php"); +include($myincpath."/inc/inc.Utils.php"); include($myincpath."/inc/inc.Init.php"); include($myincpath."/inc/inc.Extension.php"); include($myincpath."/inc/inc.DBInit.php"); -include($myincpath."/inc/inc.ClassSettings.php"); -include($myincpath."/inc/inc.Acl.php"); +include($myincpath."/inc/inc.ClassAcl.php"); if(!$folderid) { $folderid = $settings->_rootFolderID;