X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FUpdater.php;h=6b94c5e34af485e8327628206cb9c19aa6c6f7f7;hb=1004742f09b55ff781c13745781b9a7e90986faa;hp=c2aa1568cdc01534a3e1efd885e494536884342e;hpb=7b4fea0e39be9e74e9aef13e73af9bbd2b1a6397;p=github%2Fshaarli%2FShaarli.git diff --git a/application/Updater.php b/application/Updater.php index c2aa1568..6b94c5e3 100644 --- a/application/Updater.php +++ b/application/Updater.php @@ -183,7 +183,7 @@ class Updater } } - try{ + try { $this->conf->write($this->isLoggedIn); return true; } catch (IOException $e) { @@ -502,7 +502,7 @@ class Updater return true; } - $thumbnailsEnabled = $this->conf->get('thumbnail.enable_thumbnails', true); + $thumbnailsEnabled = extension_loaded('gd') && $this->conf->get('thumbnail.enable_thumbnails', true); $this->conf->set('thumbnails.mode', $thumbnailsEnabled ? Thumbnailer::MODE_ALL : Thumbnailer::MODE_NONE); $this->conf->set('thumbnails.width', 125); $this->conf->set('thumbnails.height', 90); @@ -517,6 +517,26 @@ class Updater return true; } + + /** + * Set sticky = false on all links + * + * @return bool true if the update is successful, false otherwise. + */ + public function updateMethodSetSticky() + { + foreach ($this->linkDB as $key => $link) { + if (isset($link['sticky'])) { + return true; + } + $link['sticky'] = false; + $this->linkDB[$key] = $link; + } + + $this->linkDB->save($this->conf->get('resource.page_cache')); + + return true; + } } /**