diff --git a/Core/Frameworks/Baikal/Model/User.php b/Core/Frameworks/Baikal/Model/User.php
index df91ea8..5e7649e 100644
--- a/Core/Frameworks/Baikal/Model/User.php
+++ b/Core/Frameworks/Baikal/Model/User.php
@@ -286,6 +286,6 @@ class User extends \Flake\Core\Model\Db {
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "config.yaml");
} catch (\Exception $e) {}
- return md5($this->get("username") . ':' . $config['parameters']['BAIKAL_AUTH_REALM'] . ':' . $sPassword);
+ return md5($this->get("username") . ':' . $config['parameters']['baikal_auth_realm'] . ':' . $sPassword);
}
}
diff --git a/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php b/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php
index a20699d..7ac2ca7 100644
--- a/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php
+++ b/Core/Frameworks/BaikalAdmin/Controller/Dashboard.php
@@ -42,8 +42,8 @@ class Dashboard extends \Flake\Core\Controller {
$oView->setData("BAIKAL_VERSION", BAIKAL_VERSION);
# Services status
- $oView->setData("BAIKAL_CAL_ENABLED", $config['parameters']['BAIKAL_CAL_ENABLED']);
- $oView->setData("BAIKAL_CARD_ENABLED", $config['parameters']['BAIKAL_CARD_ENABLED']);
+ $oView->setData("BAIKAL_CAL_ENABLED", $config['parameters']['baikal_cal_enabled']);
+ $oView->setData("BAIKAL_CARD_ENABLED", $config['parameters']['baikal_card_enabled']);
# Statistics: Users
$iNbUsers = \Baikal\Model\User::getBaseRequester()->count();
diff --git a/Core/Frameworks/BaikalAdmin/Controller/Install/UpgradeConfirmation.php b/Core/Frameworks/BaikalAdmin/Controller/Install/UpgradeConfirmation.php
index 5dd20da..d0c26d7 100644
--- a/Core/Frameworks/BaikalAdmin/Controller/Install/UpgradeConfirmation.php
+++ b/Core/Frameworks/BaikalAdmin/Controller/Install/UpgradeConfirmation.php
@@ -41,8 +41,8 @@ class UpgradeConfirmation extends \Flake\Core\Controller {
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "config.yaml");
} catch (\Exception $e) {}
- if (isset($config['parameters']['BAIKAL_CONFIGURED_VERSION']) && $config['parameters']['BAIKAL_CONFIGURED_VERSION'] === BAIKAL_VERSION) {
- $sMessage = "Your system is configured to use version " . $config['parameters']['BAIKAL_CONFIGURED_VERSION'] . ".
There's no upgrade to be done.";
+ if (isset($config['parameters']['baikal_configured_version']) && $config['parameters']['baikal_configured_version'] === BAIKAL_VERSION) {
+ $sMessage = "Your system is configured to use version " . $config['parameters']['baikal_configured_version'] . ".
There's no upgrade to be done.";
} else {
$sMessage = "Upgrading Baïkal from version " . "Unknown" . " to version " . BAIKAL_VERSION . "";
}
diff --git a/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php b/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php
index 031d61e..e23445b 100644
--- a/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php
+++ b/Core/Frameworks/BaikalAdmin/Controller/Settings/System.php
@@ -71,7 +71,7 @@ class System extends \Flake\Core\Controller {
try {
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "system.yaml");
} catch (\Exception $e) {}
- $bMySQL = $config['parameters']['PROJECT_DB_MYSQL'] ?? true;
+ $bMySQL = $config['parameters']['project_db_mysql'] ?? true;
}
if ($bMySQL === true) {
diff --git a/Core/Frameworks/BaikalAdmin/Core/Auth.php b/Core/Frameworks/BaikalAdmin/Core/Auth.php
index 57b053b..1eb1f08 100644
--- a/Core/Frameworks/BaikalAdmin/Core/Auth.php
+++ b/Core/Frameworks/BaikalAdmin/Core/Auth.php
@@ -34,7 +34,7 @@ class Auth {
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "config.yaml");
- if (isset($_SESSION["baikaladminauth"]) && $_SESSION["baikaladminauth"] === md5($config['parameters']['BAIKAL_ADMIN_PASSWORDHASH'])) {
+ if (isset($_SESSION["baikaladminauth"]) && $_SESSION["baikaladminauth"] === md5($config['parameters']['baikal_admin_passwordhash'])) {
return true;
}
@@ -56,8 +56,8 @@ class Auth {
} catch (\Exception $e) {
}
- if ($sUser === "admin" && $sPassHash === $config['parameters']['BAIKAL_ADMIN_PASSWORDHASH']) {
- $_SESSION["baikaladminauth"] = md5($config['parameters']['BAIKAL_ADMIN_PASSWORDHASH']);
+ if ($sUser === "admin" && $sPassHash === $config['parameters']['baikal_admin_passwordhash']) {
+ $_SESSION["baikaladminauth"] = md5($config['parameters']['baikal_admin_passwordhash']);
return true;
}
@@ -76,7 +76,7 @@ class Auth {
} catch (\Exception $e) { }
# Fallback to default value; useful when initializing App, as all constants are not set yet
- $sAuthRealm = $config['parameters']['BAIKAL_AUTH_REALM'] ?? "BaikalDAV";
+ $sAuthRealm = $config['parameters']['baikal_auth_realm'] ?? "BaikalDAV";
return md5('admin:' . $sAuthRealm . ':' . $sPassword);
}
diff --git a/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php b/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php
index fd7035e..c87ce46 100644
--- a/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php
+++ b/Core/Frameworks/BaikalAdmin/WWWRoot/install/index.php
@@ -74,15 +74,15 @@ try {
$configSystem = Yaml::parseFile(PROJECT_PATH_CONFIG . "system.yaml");
} catch (\Exception $e) { $configSystem = null; }
-if (!$configSystem || !isset($configSystem['parameters']["BAIKAL_CONFIGURED_VERSION"])) {
+if (!$configSystem || !isset($configSystem['parameters']["baikal_configured_version"])) {
# we have to upgrade Baïkal (existing installation)
$oPage->zone("Payload")->addBlock(new \BaikalAdmin\Controller\Install\Initialize());
-} elseif (!$config || !isset($config['parameters']["BAIKAL_ADMIN_PASSWORDHASH"])) {
+} elseif (!$config || !isset($config['parameters']["baikal_admin_passwordhash"])) {
# we have to set an admin password
$oPage->zone("Payload")->addBlock(new \BaikalAdmin\Controller\Install\Initialize());
} else {
- if ($configSystem['parameters']["BAIKAL_CONFIGURED_VERSION"] !== BAIKAL_VERSION) {
+ if ($configSystem['parameters']["baikal_configured_version"] !== BAIKAL_VERSION) {
# we have to upgrade Baïkal
if (\Flake\Util\Tools::GET("upgradeConfirmed")) {
$oPage->zone("Payload")->addBlock(new \BaikalAdmin\Controller\Install\VersionUpgrade());
diff --git a/Core/Frameworks/Flake/Framework.php b/Core/Frameworks/Flake/Framework.php
index 10ca51e..33ab054 100644
--- a/Core/Frameworks/Flake/Framework.php
+++ b/Core/Frameworks/Flake/Framework.php
@@ -220,10 +220,10 @@ class Framework extends \Flake\Core\Framework {
return true;
}
# Dont init db on install, but in normal mode and when upgrading
- if (defined("BAIKAL_CONTEXT_INSTALL") && (!isset($config['parameters']['BAIKAL_CONFIGURED_VERSION']) || $config['parameters']['BAIKAL_CONFIGURED_VERSION'] === BAIKAL_VERSION)) {
+ if (defined("BAIKAL_CONTEXT_INSTALL") && (!isset($config['parameters']['baikal_configured_version']) || $config['parameters']['baikal_configured_version'] === BAIKAL_VERSION)) {
return true;
}
- if ($config['parameters']['PROJECT_DB_MYSQL'] === true) {
+ if ($config['parameters']['project_db_mysql'] === true) {
self::initDbMysql($config);
} else {
self::initDbSqlite($config);
@@ -232,22 +232,22 @@ class Framework extends \Flake\Core\Framework {
protected static function initDbSqlite(array $config) {
# Asserting DB filepath is set
- if (!$config['parameters']['PROJECT_SQLITE_FILE']) {
+ if (!$config['parameters']['project_sqlite_file']) {
return false;
}
# Asserting DB file is writable
- if (file_exists($config['parameters']['PROJECT_SQLITE_FILE']) && !is_writable($config['parameters']['PROJECT_SQLITE_FILE'])) {
- die("
Baïkal is missing its configuration file, or its configuration file is unreadable.'); } -if (!isset($config['parameters']["BAIKAL_CAL_ENABLED"]) || $config['parameters']["BAIKAL_CAL_ENABLED"] !== true) { +if (!isset($config['parameters']["baikal_cal_enabled"]) || $config['parameters']["baikal_cal_enabled"] !== true) { throw new ErrorException("Baikal CalDAV is disabled.", 0, 255, __FILE__, __LINE__); } $server = new \Baikal\Core\Server( - $config['parameters']["BAIKAL_CAL_ENABLED"], - $config['parameters']["BAIKAL_CARD_ENABLED"], - $config['parameters']["BAIKAL_DAV_AUTH_TYPE"], - $config['parameters']["BAIKAL_AUTH_REALM"], + $config['parameters']["baikal_cal_enabled"], + $config['parameters']["baikal_card_enabled"], + $config['parameters']["baikal_dav_auth_type"], + $config['parameters']["baikal_auth_realm"], $GLOBALS['DB']->getPDO(), PROJECT_BASEURI . 'cal.php/' ); diff --git a/html/card.php b/html/card.php index 9946066..ae55ece 100644 --- a/html/card.php +++ b/html/card.php @@ -60,15 +60,15 @@ try { die('
Baïkal is missing its configuration file, or its configuration file is unreadable.'); } -if (!isset($config['parameters']["BAIKAL_CARD_ENABLED"]) || $config['parameters']["BAIKAL_CARD_ENABLED"] !== true) { +if (!isset($config['parameters']["baikal_card_enabled"]) || $config['parameters']["baikal_card_enabled"] !== true) { throw new ErrorException("Baikal CardDAV is disabled.", 0, 255, __FILE__, __LINE__); } $server = new \Baikal\Core\Server( - $config['parameters']["BAIKAL_CAL_ENABLED"], - $config['parameters']["BAIKAL_CARD_ENABLED"], - $config['parameters']["BAIKAL_DAV_AUTH_TYPE"], - $config['parameters']["BAIKAL_AUTH_REALM"], + $config['parameters']["baikal_cal_enabled"], + $config['parameters']["baikal_card_enabled"], + $config['parameters']["baikal_dav_auth_type"], + $config['parameters']["baikal_auth_realm"], $GLOBALS['DB']->getPDO(), PROJECT_BASEURI . 'card.php/' ); diff --git a/html/dav.php b/html/dav.php index dfd43d0..b6f8a9d 100644 --- a/html/dav.php +++ b/html/dav.php @@ -59,10 +59,10 @@ try { } $server = new \Baikal\Core\Server( - $config['parameters']["BAIKAL_CAL_ENABLED"], - $config['parameters']["BAIKAL_CARD_ENABLED"], - $config['parameters']["BAIKAL_DAV_AUTH_TYPE"], - $config['parameters']["BAIKAL_AUTH_REALM"], + $config['parameters']["baikal_cal_enabled"], + $config['parameters']["baikal_card_enabled"], + $config['parameters']["baikal_dav_auth_type"], + $config['parameters']["baikal_auth_realm"], $GLOBALS['DB']->getPDO(), PROJECT_BASEURI . 'dav.php/' );