mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-09 03:18:58 +00:00
check for database version
This commit is contained in:
parent
83407ee89f
commit
2ad7ba81b6
|
@ -50,16 +50,16 @@ if(isset($options['config'])) {
|
||||||
$settings = new Settings();
|
$settings = new Settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($settings->_extraPath))
|
/* Set maximum size of files included in xml file */
|
||||||
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
|
|
||||||
|
|
||||||
/* Set alternative config file */
|
|
||||||
if(isset($options['maxsize'])) {
|
if(isset($options['maxsize'])) {
|
||||||
$maxsize = intval($maxsize);
|
$maxsize = intval($maxsize);
|
||||||
} else {
|
} else {
|
||||||
$maxsize = 100000;
|
$maxsize = 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isset($settings->_extraPath))
|
||||||
|
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
|
||||||
|
|
||||||
require_once("SeedDMS/Core.php");
|
require_once("SeedDMS/Core.php");
|
||||||
|
|
||||||
if(isset($options['folder'])) {
|
if(isset($options['folder'])) {
|
||||||
|
@ -312,6 +312,11 @@ $db = new SeedDMS_Core_DatabaseAccess($settings->_dbDriver, $settings->_dbHostna
|
||||||
$db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostname . "\"");
|
$db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostname . "\"");
|
||||||
|
|
||||||
$dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir);
|
$dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir);
|
||||||
|
if(!$dms->checkVersion()) {
|
||||||
|
echo "Database update needed.";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$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";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user