add configuration parameter to turn of database version check

This commit is contained in:
Uwe Steinmann 2015-06-30 07:52:07 +02:00
parent 6c016f236a
commit 9666fe121f
2 changed files with 5 additions and 1 deletions

View File

@ -187,6 +187,8 @@ class Settings { /* {{{ */
var $_showMissingTranslations = false;
// Extra Path to additional software, will be added to include path
var $_extraPath = null;
// do not check version of database
var $_doNotCheckDBVersion = false;
// DB-Driver used by adodb (see adodb-readme)
var $_dbDriver = "mysql";
// DB-Server
@ -436,6 +438,7 @@ class Settings { /* {{{ */
$this->_dbDatabase = strval($tab["dbDatabase"]);
$this->_dbUser = strval($tab["dbUser"]);
$this->_dbPass = strval($tab["dbPass"]);
$this->_doNotCheckDBVersion = Settings::boolVal($tab["doNotCheckVersion"]);
// XML Path: /configuration/system/smtp
$node = $xml->xpath('/configuration/system/smtp');
@ -712,6 +715,7 @@ class Settings { /* {{{ */
$this->setXMLAttributValue($node, "dbDatabase", $this->_dbDatabase);
$this->setXMLAttributValue($node, "dbUser", $this->_dbUser);
$this->setXMLAttributValue($node, "dbPass", $this->_dbPass);
$this->setXMLAttributValue($node, "doNotCheckVersion", $this->_doNotCheckVersion);
// XML Path: /configuration/system/smtp
$node = $this->getXMLNode($xml, '/configuration/system', 'smtp');

View File

@ -28,7 +28,7 @@ $db->connect() or die ("Could not connect to db-server \"" . $settings->_dbHostn
$dms = new SeedDMS_Core_DMS($db, $settings->_contentDir.$settings->_contentOffsetDir);
if(!$dms->checkVersion()) {
if(!$settings->_doNotCheckDBVersion && !$dms->checkVersion()) {
echo "Database update needed.";
exit;
}