]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/Updater.php
Reset the history file due to datetime format change
[github/shaarli/Shaarli.git] / application / Updater.php
index 1bc5be0c3d24ad9b0c1bd8b8f6f0eabaab9c71ed..03d93a6f98ac22d543b243005b3ee185a797e58c 100644 (file)
@@ -378,6 +378,22 @@ class Updater
 
         $this->conf->set('plugins.PIWIK_URL', 'http://'. $this->conf->get('plugins.PIWIK_URL'));
         $this->conf->write($this->isLoggedIn);
+
+        return true;
+    }
+
+    /**
+     * Use ATOM feed as default.
+     */
+    public function updateMethodAtomDefault()
+    {
+        if (!$this->conf->exists('feed.show_atom') || $this->conf->get('feed.show_atom') === true) {
+            return true;
+        }
+
+        $this->conf->set('feed.show_atom', true);
+        $this->conf->write($this->isLoggedIn);
+
         return true;
     }
 
@@ -424,6 +440,17 @@ class Updater
         $this->conf->write($this->isLoggedIn);
         return true;
     }
+
+    /**
+     * Reset history store file due to date format change.
+     */
+    public function updateMethodResetHistoryFile()
+    {
+        if (is_file($this->conf->get('resource.history'))) {
+            unlink($this->conf->get('resource.history'));
+        }
+        return true;
+    }
 }
 
 /**