Fixed leftovers from migration
This commit is contained in:
parent
28c2ade603
commit
9736051485
4 changed files with 11 additions and 20 deletions
|
@ -36,7 +36,7 @@ class Database extends \Flake\Core\Controller {
|
|||
protected $oForm; # \Formal\Form
|
||||
|
||||
function execute() {
|
||||
$this->oModel = new \Baikal\Model\Config\System(PROJECT_PATH_CONFIG . "system.yaml");
|
||||
$this->oModel = new \Baikal\Model\Config\System();
|
||||
|
||||
if (file_exists(PROJECT_PATH_SPECIFIC . "config.system.php")) {
|
||||
require_once(PROJECT_PATH_SPECIFIC . "config.system.php");
|
||||
|
|
|
@ -45,9 +45,9 @@ class Initialize extends \Flake\Core\Controller {
|
|||
|
||||
$this->createHtaccessFilesIfNeeded();
|
||||
|
||||
$this->oModel = new \Baikal\Model\Config\Standard(PROJECT_PATH_CONFIG . "config.yaml");
|
||||
$this->oModel = new \Baikal\Model\Config\Standard();
|
||||
|
||||
// If we come from pre-0.7.0, we need to get the values from the config.php and config.system.php files
|
||||
// If we come from pre-0.7.0, we need to get the values from the config.php and config.system.php files
|
||||
if (file_exists(PROJECT_PATH_SPECIFIC . "config.php")) {
|
||||
require_once(PROJECT_PATH_SPECIFIC . "config.php");
|
||||
$this->oModel->set('timezone', PROJECT_TIMEZONE);
|
||||
|
|
|
@ -530,26 +530,17 @@ SQL
|
|||
}
|
||||
|
||||
protected function updateConfiguredVersion($sVersionTo) {
|
||||
|
||||
# Create new settings
|
||||
$oConfig = new \Baikal\Model\Config\Standard("config");
|
||||
$oConfig->persist();
|
||||
|
||||
# Update BAIKAL_CONFIGURED_VERSION
|
||||
$oConfig = new \Baikal\Model\Config\System("system");
|
||||
$oConfig = new \Baikal\Model\Config\System();
|
||||
$oConfig->set("baikal_configured_version", $sVersionTo);
|
||||
$oConfig->persist();
|
||||
}
|
||||
|
||||
protected function assertConfigWritable() {
|
||||
# Parsing the config also makes sure that it is not malformed
|
||||
$oConfig = new \Baikal\Model\Config\Standard(PROJECT_PATH_CONFIG . "config.yaml");
|
||||
$oConfig = new \Baikal\Model\Config\System();
|
||||
if ($oConfig->writable() === false) {
|
||||
throw new \Exception(PROJECT_PATH_CONFIG . "config.yaml is not writable");
|
||||
}
|
||||
$oConfig = new \Baikal\Model\Config\System(PROJECT_PATH_CONFIG . "system.yaml");
|
||||
if ($oConfig->writable() === false) {
|
||||
throw new \Exception(PROJECT_PATH_CONFIG . "system.yaml is not writable");
|
||||
throw new \Exception(PROJECT_PATH_CONFIG . "baikal.yaml is not writable");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -258,19 +258,19 @@ class Framework extends \Flake\Core\Framework {
|
|||
protected static function initDbMysql(array $config) {
|
||||
|
||||
if (!$config['database']['mysql_host']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_HOST, containing the MySQL host name, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_HOST, containing the MySQL host name, is not set.<br />You should set it in config/baikal.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['database']['mysql_dbname']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_DBNAME, containing the MySQL database name, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_DBNAME, containing the MySQL database name, is not set.<br />You should set it in config/baikal.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['database']['mysql_username']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_USERNAME, containing the MySQL database username, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_USERNAME, containing the MySQL database username, is not set.<br />You should set it in config/baikal.yaml</h3>");
|
||||
}
|
||||
|
||||
if (!$config['database']['mysql_password']) {
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_PASSWORD, containing the MySQL database password, is not set.<br />You should set it in config/system.yaml</h3>");
|
||||
die("<h3>The constant PROJECT_DB_MYSQL_PASSWORD, containing the MySQL database password, is not set.<br />You should set it in config/baikal.yaml</h3>");
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -284,7 +284,7 @@ class Framework extends \Flake\Core\Framework {
|
|||
# We now setup t6he connexion to use UTF8
|
||||
$GLOBALS["DB"]->query("SET NAMES UTF8");
|
||||
} catch (\Exception $e) {
|
||||
die("<h3>Baïkal was not able to establish a connexion to the configured MySQL database (as configured in config/system.yaml).</h3>");
|
||||
die("<h3>Baïkal was not able to establish a connexion to the configured MySQL database (as configured in config/baikal.yaml).</h3>");
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue