]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/LinkDB.php
Url: introduce global helper functions for cleanup and scheme detection
[github/shaarli/Shaarli.git] / application / LinkDB.php
index 1e16fef179fefa843ef7f10eb62d3471e593928c..8473350555e3b8abfdba1a4bd995c9d1da249613 100644 (file)
@@ -269,8 +269,10 @@ You use the community supported version of the original Shaarli project, by Seba
 
     /**
      * Saves the database from memory to disk
+     *
+     * @param string $pageCacheDir page cache directory
      */
-    public function savedb()
+    public function savedb($pageCacheDir)
     {
         if (!$this->_loggedIn) {
             // TODO: raise an Exception instead
@@ -280,11 +282,15 @@ You use the community supported version of the original Shaarli project, by Seba
             $this->_datastore,
             self::$phpPrefix.base64_encode(gzdeflate(serialize($this->_links))).self::$phpSuffix
         );
-        invalidateCaches();
+        invalidateCaches($pageCacheDir);
     }
 
     /**
      * Returns the link for a given URL, or False if it does not exist.
+     *
+     * @param string $url URL to search for
+     *
+     * @return mixed the existing link if it exists, else 'false'
      */
     public function getLinkFromUrl($url)
     {
@@ -439,4 +445,3 @@ You use the community supported version of the original Shaarli project, by Seba
         return $linkDays;
     }
 }
-?>