X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Fconfig%2FConfigManager.php;h=fb0850235fb78da19b7ea686ebcad0a07f082d49;hb=4cf3564d28dc8e4d08a3e64f09ad045ffbde97ae;hp=faf25426e613018ed06e8ad97b15d869cdc9ec19;hpb=a3724717ec37d4bd54dc117ef439c8a182157882;p=github%2Fshaarli%2FShaarli.git diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php index faf25426..fb085023 100644 --- a/application/config/ConfigManager.php +++ b/application/config/ConfigManager.php @@ -3,6 +3,7 @@ namespace Shaarli\Config; use Shaarli\Config\Exception\MissingFieldConfigException; use Shaarli\Config\Exception\UnauthorizedConfigException; +use Shaarli\Thumbnailer; /** * Class ConfigManager @@ -207,7 +208,7 @@ class ConfigManager * * @throws MissingFieldConfigException: a mandatory field has not been provided in $conf. * @throws UnauthorizedConfigException: user is not authorize to change configuration. - * @throws \IOException: an error occurred while writing the new config file. + * @throws \Shaarli\Exceptions\IOException: an error occurred while writing the new config file. */ public function write($isLoggedIn) { @@ -221,7 +222,6 @@ class ConfigManager 'general.title', 'general.header_link', 'privacy.default_private_links', - 'redirector.url', ); // Only logged in user can alter config. @@ -362,14 +362,12 @@ class ConfigManager $this->setEmpty('security.open_shaarli', false); $this->setEmpty('security.allowed_protocols', ['ftp', 'ftps', 'magnet']); - $this->setEmpty('general.header_link', '?'); + $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('general.retrieve_description', true); + $this->setEmpty('general.enable_async_metadata', true); $this->setEmpty('updates.check_updates', false); $this->setEmpty('updates.check_updates_branch', 'stable'); @@ -385,17 +383,17 @@ class ConfigManager // 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); - - $this->setEmpty('redirector.url', ''); - $this->setEmpty('redirector.encode_url', true); + $this->setEmpty('thumbnails.mode', Thumbnailer::MODE_ALL); + $this->setEmpty('thumbnails.width', '125'); + $this->setEmpty('thumbnails.height', '90'); $this->setEmpty('translation.language', 'auto'); $this->setEmpty('translation.mode', 'php'); $this->setEmpty('translation.extensions', []); $this->setEmpty('plugins', array()); + + $this->setEmpty('formatter', 'markdown'); } /**