X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUpdater.php;h=27cb2f0a43e29b2e4879d91cac672b4a16e3159f;hb=3c66e56435359dc678048193e8ee239d06f79b64;hp=90aba74508faa33472d3bc6a754f127cf1a8e066;hpb=c03455af1161befa404ed8759ca55b63bbf593a2;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Updater.php b/application/Updater.php index 90aba745..27cb2f0a 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -1,4 +1,6 @@ conf->get('resource.theme') !== 'default') { + return true; + } + $this->conf->set('resource.theme', 'vintage'); + $this->conf->write($this->isLoggedIn); + + return true; + } + + /** + * * `markdown_escape` is a new setting, set to true as default. + * + * If the markdown plugin was already enabled, escaping is disabled to avoid + * breaking existing entries. + */ + public function updateMethodEscapeMarkdown() + { + if ($this->conf->exists('security.markdown_escape')) { + return true; + } + + if (in_array('markdown', $this->conf->get('general.enabled_plugins'))) { + $this->conf->set('security.markdown_escape', false); + } else { + $this->conf->set('security.markdown_escape', true); + } + $this->conf->write($this->isLoggedIn); + + return true; + } } /**