X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2FLinkDB.php;h=8473350555e3b8abfdba1a4bd995c9d1da249613;hb=44d60adc5e2fa547bc49620f7e647794f0cad631;hp=1e16fef179fefa843ef7f10eb62d3471e593928c;hpb=5b0ebbc5de06b8a0e9679b78b45d0dc755db7986;p=github%2Fshaarli%2FShaarli.git diff --git a/application/LinkDB.php b/application/LinkDB.php index 1e16fef1..84733505 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -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; } } -?>