diff --git a/utils/xmldump.php b/utils/xmldump.php index 71302ddeb..e9475abcd 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; @@ -427,6 +438,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */ } echo $indent."\n"; + $statistic['documents']++; } } } /* }}} */ @@ -443,7 +455,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"; @@ -495,6 +507,7 @@ if($users) { echo " \n"; } echo " \n"; + $statistic['users']++; } echo "\n"; } @@ -515,6 +528,7 @@ if($groups) { echo " \n"; } echo " \n"; + $statistic['groups']++; } echo "\n"; } @@ -537,6 +551,7 @@ if($categories) { echo " \n"; } echo " \n"; + $statistic['keywordcategories']++; } echo "\n"; } @@ -548,6 +563,7 @@ if($categories) { echo " getId()."\">\n"; echo " ".wrapWithCData($category->getName())."\n"; echo " \n"; + $statistic['documentcategories']++; } echo "\n"; } @@ -580,6 +596,7 @@ if($attrdefs) { echo " ".$attrdef->getMaxValues()."\n"; echo " ".wrapWithCData($attrdef->getRegex())."\n"; echo " \n"; + $statistic['attributedefinitions']++; } echo "\n"; } @@ -614,5 +631,10 @@ if($transmittals) { echo "\n"; } +echo "\n"; +echo " \n"; +foreach($statistic as $type=>$count) + echo " <".$type.">".$count."\n"; +echo "\n"; echo "\n"; ?>