From 3cf0cb71f1ef3a8865e8086b0560a4f0647b086f Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Sun, 24 Mar 2019 20:41:11 +0100 Subject: [PATCH] Fixing tests --- .gitignore | 4 +- src/Core/Config/Configuration.php | 2 +- tests/datasets/config/.htconfig.php | 63 +++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 tests/datasets/config/.htconfig.php diff --git a/.gitignore b/.gitignore index 0d18ab0bdc..49d08ba71e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ favicon.* -.htconfig.php -.htpreconfig.php +/.htconfig.php +/.htpreconfig.php \#* *.log *.out diff --git a/src/Core/Config/Configuration.php b/src/Core/Config/Configuration.php index abf6af37ca..c6fe626d91 100644 --- a/src/Core/Config/Configuration.php +++ b/src/Core/Config/Configuration.php @@ -127,7 +127,7 @@ class Configuration $cached = $this->configCache->set($cat, $key, $value); // If there is no connected adapter, we're finished - if (!$this->configAdapter->isConnected() && !empty($this->configSaveBlacklist[$cat][$key])) { + if (!$this->configAdapter->isConnected() || !empty($this->configSaveBlacklist[$cat][$key])) { return $cached; } diff --git a/tests/datasets/config/.htconfig.php b/tests/datasets/config/.htconfig.php new file mode 100644 index 0000000000..04e3e9cc96 --- /dev/null +++ b/tests/datasets/config/.htconfig.php @@ -0,0 +1,63 @@ +config['system']['db_charset'] = "anotherCharset"; + +// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". +// It can be changed later and only applies to timestamps for anonymous viewers. +$default_timezone = 'Europe/Berlin'; +$lang = 'fr'; + +// What is your site name? +$a->config['sitename'] = "Friendica My Network"; + +// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. +// Be certain to create your own personal account before setting +// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on +// the registration page. REGISTER_APPROVE requires you set 'admin_email' +// to the email address of an already registered person who can authorise +// and/or approve/deny the request. +// In order to perform system administration via the admin panel, admin_email +// must precisely match the email address of the person logged in. +$a->config['register_policy'] = REGISTER_OPEN; +$a->config['register_text'] = 'A register text'; +$a->config['admin_email'] = 'admin@test.it'; +$a->config['admin_nickname'] = 'Friendly admin'; + +// Maximum size of an imported message, 0 is unlimited +$a->config['max_import_size'] = 999; + +// maximum size of uploaded photos +$a->config['system']['maximagesize'] = 666; + +// Location of PHP command line processor +$a->config['php_path'] = '/another/php'; + +// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts +$a->config['system']['huburl'] = '[internal]'; + +// allowed themes (change this from admin panel after installation) +$a->config['system']['allowed_themes'] = 'quattro,vier,duepuntozero'; + +// default system theme +$a->config['system']['theme'] = 'frio'; + +// By default allow pseudonyms +$a->config['system']['no_regfullname'] = true; + +//Deny public access to the local directory +//$a->config['system']['block_local_dir'] = false; +// Location of the global directory +$a->config['system']['directory'] = 'http://another.url'; -- 2.39.5