]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
re-add readDb() missing from previous merge
authornodiscc <nodiscc@gmail.com>
Tue, 23 Jun 2015 12:57:54 +0000 (14:57 +0200)
committernodiscc <nodiscc@gmail.com>
Tue, 23 Jun 2015 12:57:54 +0000 (14:57 +0200)
application/LinkDB.php

index 388002f666eff8f80608fd31a4d3423b80da6f57..137f42e5d5cde66aa1fb1d3eb9dc116e796ddfb9 100644 (file)
@@ -208,6 +208,13 @@ class LinkDB implements Iterator, Countable, ArrayAccess
      */
     private function readdb()
     {
+
+        // Public links are hidden and user not logged in => nothing to show
+        if ($GLOBALS['config']['HIDE_PUBLIC_LINKS'] && !isLoggedIn()) {
+            $this->links = array();
+            return;
+        }
+
         // Read data
         // Note that gzinflate is faster than gzuncompress.
         // See: http://www.php.net/manual/en/function.gzdeflate.php#96439