From c85e00510aafde7c20ca328267d490cc0006215d Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 Aug 2015 18:05:41 +0200 Subject: [PATCH 1/3] add number of objects export at end of file, add export date --- utils/xmldump.php | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/utils/xmldump.php b/utils/xmldump.php index 1c77fd9b5..79dd9826c 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -91,8 +91,18 @@ if(isset($options['skip-root'])) { $skiproot = true; } +$statistic = array( + 'documents'=>0, + 'folders'=>0, + 'users'=>0, + 'groups'=>0, + 'attributedefinitions'=>0, + 'keywordcategories'=>0, + 'documentcategories'=>0, +); + function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ - global $index, $dms, $maxsize, $contentdir; + global $statistic, $index, $dms, $maxsize, $contentdir; if(!$skipcurrent) { echo $indent."getId()."\""; @@ -134,6 +144,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ echo $indent." \n"; } echo $indent."\n"; + $statistic['folders']++; $parentfolder = $folder; } else { $parentfolder = null; @@ -375,6 +386,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ } echo $indent."\n"; + $statistic['documents']++; } } } /* }}} */ @@ -391,7 +403,7 @@ if(!$settings->_doNotCheckDBVersion && !$dms->checkVersion()) { $dms->setRootFolderID($settings->_rootFolderID); echo "\n"; -echo "getDBVersion(), 1, 3))."\">\n"; +echo "getDBVersion(), 1, 3))."\" date=\"".date('Y-m-d H:i:s')."\">\n"; $users = $dms->getAllUsers(); if($users) { echo "\n"; @@ -435,6 +447,7 @@ if($users) { echo " \n"; } echo " \n"; + $statistic['users']++; } echo "\n"; } @@ -455,6 +468,7 @@ if($groups) { echo " \n"; } echo " \n"; + $statistic['groups']++; } echo "\n"; } @@ -477,6 +491,7 @@ if($categories) { echo " \n"; } echo " \n"; + $statistic['keywordcategories']++; } echo "\n"; } @@ -488,6 +503,7 @@ if($categories) { echo " getId()."\">\n"; echo " ".wrapWithCData($category->getName())."\n"; echo " \n"; + $statistic['documentcategories']++; } echo "\n"; } @@ -520,6 +536,7 @@ if($attrdefs) { echo " ".$attrdef->getMaxValues()."\n"; echo " ".wrapWithCData($attrdef->getRegex())."\n"; echo " \n"; + $statistic['attributedefinitions']++; } echo "\n"; } @@ -530,4 +547,8 @@ if($folder) { } echo "\n"; +echo "\n" ?> From ac544ef206a193db326cdfd59ed1709112b507b0 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 Aug 2015 18:16:30 +0200 Subject: [PATCH 2/3] add command line to statistic section --- utils/xmldump.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/xmldump.php b/utils/xmldump.php index 79dd9826c..4ad5be69f 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -548,6 +548,9 @@ if($folder) { echo "\n"; echo "\n" From e4b3c76f0fc51afce4be843afc097e94e3f1d29c Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 6 Aug 2015 18:20:43 +0200 Subject: [PATCH 3/3] add statistics with regular xml tags --- utils/xmldump.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/utils/xmldump.php b/utils/xmldump.php index 4ad5be69f..3abcfd7d5 100644 --- a/utils/xmldump.php +++ b/utils/xmldump.php @@ -546,12 +546,10 @@ if($folder) { tree($folder, null, '', $skiproot); } -echo "\n"; -echo "\n" + echo " <".$type.">".$count."\n"; +echo "\n"; +echo "\n"; ?>