Added missing migrations to a single config file

This commit is contained in:
ByteHamster 2020-03-22 17:33:13 +01:00
parent 0c0a8f4b21
commit 71ea5fa03d
5 changed files with 18 additions and 6 deletions

3
.gitignore vendored
View file

@ -17,3 +17,6 @@ vendor
# Others
.DS_Store
# IDE
nbproject

View file

@ -27,6 +27,8 @@
namespace Baikal\Model;
use Symfony\Component\Yaml\Yaml;
class Calendar extends \Flake\Core\Model\Db {
const DATATABLE = "calendarinstances";
const PRIMARYKEY = "id";
@ -39,11 +41,21 @@ class Calendar extends \Flake\Core\Model\Db {
"description" => "",
"calendarorder" => 0,
"calendarcolor" => "",
"timezone" => PROJECT_TIMEZONE,
"timezone" => null,
"calendarid" => 0
];
protected $oCalendar; # Baikal\Model\Calendar\Calendar
function __construct($sPrimary = false) {
parent::__construct($sPrimary);
try {
$config = Yaml::parseFile(PROJECT_PATH_CONFIG . "baikal.yaml");
$this->set("timezone", $config['system']["timezone"]);
} catch (\Exception $e) {
error_log('Error reading baikal.yaml file : ' . $e->getMessage());
}
}
protected function initFloating() {
parent::initFloating();
$this->oCalendar = new Calendar\Calendar();

View file

@ -124,7 +124,7 @@ class Standard extends \Baikal\Model\Config {
error_log('Error reading baikal.yaml file : ' . $e->getMessage());
}
if (!isset($config['parameters']["admin_passwordhash"]) || trim($config['system']["admin_passwordhash"]) === "") {
if (!isset($config['system']["admin_passwordhash"]) || trim($config['system']["admin_passwordhash"]) === "") {
# No password set (Form is used in install tool), so password is required as it has to be defined
$oMorpho->element("admin_passwordhash")->setOption("validation", "required");

View file

@ -60,7 +60,7 @@ try {
die('<h1>Incomplete installation</h1><p>Ba&iuml;kal is missing its configuration file, or its configuration file is unreadable.');
}
if (!isset($config['system']["card_enabled"]) || $config['parameters']["card_enabled"] !== true) {
if (!isset($config['system']["card_enabled"]) || $config['system']["card_enabled"] !== true) {
throw new ErrorException("Baikal CardDAV is disabled.", 0, 255, __FILE__, __LINE__);
}

View file

@ -8,9 +8,6 @@ parameters:
-
message: '#Instantiated class Flake\\Core\\Exception not found.#'
path: Core/Frameworks/Flake/Util/Frameworks.php
-
message: '#Call to an undefined method Baikal\\Model\\Config\\Standard::getDefaultSystemConfig\(\).#'
path: Core/Frameworks/Baikal/Model/Config/Standard.php
-
message: '#Call to static method compileCss\(\) on an unknown class Frameworks\\LessPHP\\Delegate.#'
path: Core/Frameworks/Flake/Controller/Page.php