mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
Merge branch 'seeddms-4.3.x' into seeddms-5.0.x
This commit is contained in:
commit
f81e4b23c0
|
@ -681,11 +681,21 @@ function resolve_links() { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
function startElement($parser, $name, $attrs) { /* {{{ */
|
function startElement($parser, $name, $attrs) { /* {{{ */
|
||||||
global $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link;
|
global $dms, $noversioncheck, $elementstack, $objmap, $cur_user, $cur_group, $cur_folder, $cur_document, $cur_version, $cur_statuslog, $cur_approval, $cur_approvallog, $cur_review, $cur_reviewlog, $cur_attrdef, $cur_documentcat, $cur_keyword, $cur_keywordcat, $cur_file, $cur_link;
|
||||||
|
|
||||||
$parent = end($elementstack);
|
$parent = end($elementstack);
|
||||||
array_push($elementstack, array('name'=>$name, 'attributes'=>$attrs));
|
array_push($elementstack, array('name'=>$name, 'attributes'=>$attrs));
|
||||||
switch($name) {
|
switch($name) {
|
||||||
|
case "DMS":
|
||||||
|
if(!$noversioncheck) {
|
||||||
|
$xdbversion = explode('.', $attrs['DBVERSION']);
|
||||||
|
$dbversion = $dms->getDBVersion();
|
||||||
|
if(($xdbversion[0] != $dbversion['major']) || ($xdbversion[1] != $dbversion['minor'])) {
|
||||||
|
echo "Error: Database version (".implode('.', array($dbversion['major'], $dbversion['minor'], $dbversion['subminor'])).") doesn't match version in input file (".implode('.', $xdbversion).").\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case "USER":
|
case "USER":
|
||||||
/* users can be the users data, the member of a group, a mandatory
|
/* users can be the users data, the member of a group, a mandatory
|
||||||
* reviewer or approver
|
* reviewer or approver
|
||||||
|
@ -1125,7 +1135,7 @@ function characterData($parser, $data) { /* {{{ */
|
||||||
|
|
||||||
$version = "0.0.1";
|
$version = "0.0.1";
|
||||||
$shortoptions = "hv";
|
$shortoptions = "hv";
|
||||||
$longoptions = array('help', 'version', 'debug', 'config:', 'sections:', 'folder:', 'file:', 'contentdir:', 'default-user:', 'export-mapping:');
|
$longoptions = array('help', 'version', 'debug', 'config:', 'sections:', 'folder:', 'file:', 'contentdir:', 'default-user:', 'export-mapping:', 'no-version-check');
|
||||||
if(false === ($options = getopt($shortoptions, $longoptions))) {
|
if(false === ($options = getopt($shortoptions, $longoptions))) {
|
||||||
usage();
|
usage();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -1194,6 +1204,11 @@ if(isset($options['export-mapping'])) {
|
||||||
$exportmapping = $options['export-mapping'];
|
$exportmapping = $options['export-mapping'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$noversioncheck = false;
|
||||||
|
if(isset($options['no-version-check'])) {
|
||||||
|
$noversioncheck = true;
|
||||||
|
}
|
||||||
|
|
||||||
$sections = array('documents', 'folders', 'groups', 'users', 'keywordcategories', 'documentcategories', 'attributedefinitions');
|
$sections = array('documents', 'folders', 'groups', 'users', 'keywordcategories', 'documentcategories', 'attributedefinitions');
|
||||||
if(isset($options['sections'])) {
|
if(isset($options['sections'])) {
|
||||||
$sections = explode(',', $options['sections']);
|
$sections = explode(',', $options['sections']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user