X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fconfig%2FConfigManager.php;h=124fedc2fe2d155b0ed2bbd0aee9b3595f4e696b;hb=1b93137e16694f52952c930848e1a7928e8a00a6;hp=fdd5b3d76a109b0e16b93f6020e448df2613dfdf;hpb=c5f5365ae6d57f6ca49b9ed6b6be05c52a05c3bb;p=github%2Fshaarli%2FShaarli.git diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index fdd5b3d7..124fedc2 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,11 @@ 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('thumbnails.enabled', true); + $this->setEmpty('thumbnails.width', 120); + $this->setEmpty('thumbnails.height', 120); $this->setEmpty('updates.check_updates', false); $this->setEmpty('updates.check_updates_branch', 'stable'); @@ -327,6 +332,7 @@ 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); @@ -337,6 +343,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()); }