mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 05:01:43 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
742bacea62
|
@ -91,8 +91,18 @@ if(isset($options['skip-root'])) {
|
||||||
$skiproot = true;
|
$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) { /* {{{ */
|
function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */
|
||||||
global $index, $dms, $maxsize, $contentdir;
|
global $statistic, $index, $dms, $maxsize, $contentdir;
|
||||||
|
|
||||||
if(!$skipcurrent) {
|
if(!$skipcurrent) {
|
||||||
echo $indent."<folder id=\"".$folder->getId()."\"";
|
echo $indent."<folder id=\"".$folder->getId()."\"";
|
||||||
|
@ -134,6 +144,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */
|
||||||
echo $indent." </acls>\n";
|
echo $indent." </acls>\n";
|
||||||
}
|
}
|
||||||
echo $indent."</folder>\n";
|
echo $indent."</folder>\n";
|
||||||
|
$statistic['folders']++;
|
||||||
$parentfolder = $folder;
|
$parentfolder = $folder;
|
||||||
} else {
|
} else {
|
||||||
$parentfolder = null;
|
$parentfolder = null;
|
||||||
|
@ -375,6 +386,7 @@ function tree($folder, $parent=null, $indent='', $skipcurrent=false) { /* {{{ */
|
||||||
}
|
}
|
||||||
|
|
||||||
echo $indent."</document>\n";
|
echo $indent."</document>\n";
|
||||||
|
$statistic['documents']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -391,7 +403,7 @@ if(!$settings->_doNotCheckDBVersion && !$dms->checkVersion()) {
|
||||||
$dms->setRootFolderID($settings->_rootFolderID);
|
$dms->setRootFolderID($settings->_rootFolderID);
|
||||||
|
|
||||||
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||||
echo "<dms dbversion=\"".implode('.', array_slice($dms->getDBVersion(), 1, 3))."\">\n";
|
echo "<dms dbversion=\"".implode('.', array_slice($dms->getDBVersion(), 1, 3))."\" date=\"".date('Y-m-d H:i:s')."\">\n";
|
||||||
$users = $dms->getAllUsers();
|
$users = $dms->getAllUsers();
|
||||||
if($users) {
|
if($users) {
|
||||||
echo "<users>\n";
|
echo "<users>\n";
|
||||||
|
@ -436,6 +448,7 @@ if($users) {
|
||||||
echo " </mandatory_approvers>\n";
|
echo " </mandatory_approvers>\n";
|
||||||
}
|
}
|
||||||
echo " </user>\n";
|
echo " </user>\n";
|
||||||
|
$statistic['users']++;
|
||||||
}
|
}
|
||||||
echo "</users>\n";
|
echo "</users>\n";
|
||||||
}
|
}
|
||||||
|
@ -456,6 +469,7 @@ if($groups) {
|
||||||
echo " </users>\n";
|
echo " </users>\n";
|
||||||
}
|
}
|
||||||
echo " </group>\n";
|
echo " </group>\n";
|
||||||
|
$statistic['groups']++;
|
||||||
}
|
}
|
||||||
echo "</groups>\n";
|
echo "</groups>\n";
|
||||||
}
|
}
|
||||||
|
@ -478,6 +492,7 @@ if($categories) {
|
||||||
echo " </keywords>\n";
|
echo " </keywords>\n";
|
||||||
}
|
}
|
||||||
echo " </keywordcategory>\n";
|
echo " </keywordcategory>\n";
|
||||||
|
$statistic['keywordcategories']++;
|
||||||
}
|
}
|
||||||
echo "</keywordcategories>\n";
|
echo "</keywordcategories>\n";
|
||||||
}
|
}
|
||||||
|
@ -489,6 +504,7 @@ if($categories) {
|
||||||
echo " <documentcategory id=\"".$category->getId()."\">\n";
|
echo " <documentcategory id=\"".$category->getId()."\">\n";
|
||||||
echo " <attr name=\"name\">".wrapWithCData($category->getName())."</attr>\n";
|
echo " <attr name=\"name\">".wrapWithCData($category->getName())."</attr>\n";
|
||||||
echo " </documentcategory>\n";
|
echo " </documentcategory>\n";
|
||||||
|
$statistic['documentcategories']++;
|
||||||
}
|
}
|
||||||
echo "</documentcategories>\n";
|
echo "</documentcategories>\n";
|
||||||
}
|
}
|
||||||
|
@ -521,6 +537,7 @@ if($attrdefs) {
|
||||||
echo " <attr name=\"maxvalues\">".$attrdef->getMaxValues()."</attr>\n";
|
echo " <attr name=\"maxvalues\">".$attrdef->getMaxValues()."</attr>\n";
|
||||||
echo " <attr name=\"regex\">".wrapWithCData($attrdef->getRegex())."</attr>\n";
|
echo " <attr name=\"regex\">".wrapWithCData($attrdef->getRegex())."</attr>\n";
|
||||||
echo " </attributedefinition>\n";
|
echo " </attributedefinition>\n";
|
||||||
|
$statistic['attributedefinitions']++;
|
||||||
}
|
}
|
||||||
echo "</attrіbutedefinitions>\n";
|
echo "</attrіbutedefinitions>\n";
|
||||||
}
|
}
|
||||||
|
@ -530,5 +547,10 @@ if($folder) {
|
||||||
tree($folder, null, '', $skiproot);
|
tree($folder, null, '', $skiproot);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "<statistics>\n";
|
||||||
|
echo " <command><![CDATA[".implode(" ", $argv)."]]></command>\n";
|
||||||
|
foreach($statistic as $type=>$count)
|
||||||
|
echo " <".$type.">".$count."</".$type.">\n";
|
||||||
|
echo "</statistics>\n";
|
||||||
echo "</dms>\n";
|
echo "</dms>\n";
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user