do not access $settings before loading it

This commit is contained in:
Uwe Steinmann 2022-01-31 12:06:19 +01:00
parent 8b558c7142
commit aa8eb38560

View File

@ -87,10 +87,9 @@ if(isset($options['sections'])) {
$sections = explode(',', $options['sections']);
}
$folderid = 0;
if(isset($options['folder'])) {
$folderid = intval($options['folder']);
} else {
$folderid = $settings->_rootFolderID;
}
$skiproot = false;
@ -464,6 +463,10 @@ include($myincpath."/inc/inc.Init.php");
include($myincpath."/inc/inc.Extension.php");
include($myincpath."/inc/inc.DBInit.php");
if(!$folderid) {
$folderid = $settings->_rootFolderID;
}
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<dms dbversion=\"".implode('.', array_slice($dms->getDBVersion(), 1, 3))."\" date=\"".date('Y-m-d H:i:s')."\">\n";