X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fconfig%2FConfigManager.php;h=82f4a368e669d57316884a1deec581841813214f;hb=359696dcbb5073be82bb18f7b557b9ba0176d7c9;hp=0fc5a5c7f2b319401fe698c77a88b1fcb0786f62;hpb=fc27141cf6eb04d3d8714385cb6961a8063fe61b;p=github%2Fshaarli%2FShaarli.git diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index 0fc5a5c7..82f4a368 100644 --- a/application/config/ConfigManager.php +++ b/application/config/ConfigManager.php @@ -123,7 +123,7 @@ class ConfigManager * Supports nested settings with dot separated keys. * * @param string $setting Asked setting, keys separated with dots. - * @param string $value Value to set. + * @param mixed $value Value to set. * @param bool $write Write the new setting in the config file, default false. * @param bool $isLoggedIn User login state, default false. * @@ -132,7 +132,7 @@ class ConfigManager public function set($setting, $value, $write = false, $isLoggedIn = false) { if (empty($setting) || ! is_string($setting)) { - throw new \Exception('Invalid setting key parameter. String expected, got: '. gettype($setting)); + throw new \Exception(t('Invalid setting key parameter. String expected, got: '). gettype($setting)); } // During the ConfigIO transition, map legacy settings to the new ones. @@ -317,6 +317,7 @@ class ConfigManager $this->setEmpty('general.header_link', '?'); $this->setEmpty('general.links_per_page', 20); $this->setEmpty('general.enabled_plugins', self::$DEFAULT_PLUGINS); + $this->setEmpty('general.default_note_title', 'Note: '); $this->setEmpty('updates.check_updates', false); $this->setEmpty('updates.check_updates_branch', 'stable'); @@ -327,7 +328,10 @@ class ConfigManager $this->setEmpty('privacy.default_private_links', false); $this->setEmpty('privacy.hide_public_links', false); + $this->setEmpty('privacy.force_login', false); $this->setEmpty('privacy.hide_timestamps', false); + // default state of the 'remember me' checkbox of the login form + $this->setEmpty('privacy.remember_user_default', true); $this->setEmpty('thumbnail.enable_thumbnails', true); $this->setEmpty('thumbnail.enable_localcache', true); @@ -335,6 +339,10 @@ class ConfigManager $this->setEmpty('redirector.url', ''); $this->setEmpty('redirector.encode_url', true); + $this->setEmpty('translation.language', 'auto'); + $this->setEmpty('translation.mode', 'php'); + $this->setEmpty('translation.extensions', []); + $this->setEmpty('plugins', array()); }