mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-11 09:35:00 +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();
|
||||
}
|
||||
|
||||
if(isset($settings->_extraPath))
|
||||
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
|
||||
|
||||
/* Set alternative config file */
|
||||
/* Set maximum size of files included in xml file */
|
||||
if(isset($options['maxsize'])) {
|
||||
$maxsize = intval($maxsize);
|
||||
} else {
|
||||
$maxsize = 100000;
|
||||
}
|
||||
|
||||
if(isset($settings->_extraPath))
|
||||
ini_set('include_path', $settings->_extraPath. PATH_SEPARATOR .ini_get('include_path'));
|
||||
|
||||
require_once("SeedDMS/Core.php");
|
||||
|
||||
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 . "\"");
|
||||
|
||||
$dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir);
|
||||
if(!$dms->checkVersion()) {
|
||||
echo "Database update needed.";
|
||||
exit;
|
||||
}
|
||||
|
||||
$dms->setRootFolderID($settings->_rootFolderID);
|
||||
|
||||
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user