]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/poche/Poche.class.php
Merge branch 'dev' of https://github.com/inthepoche/poche into dev
[github/wallabag/wallabag.git] / inc / poche / Poche.class.php
index adec9b288714c4424d59bf1d1289c0349a578c59..4f70afb755c2a0188af55973ca7dd4ab5b7a4ee6 100644 (file)
@@ -49,6 +49,7 @@ class Poche
             if (! $this->store->isInstalled()) {
                 $this->install();
             }
+            $this->store->checkTags();
         }
     }
     
@@ -446,7 +447,7 @@ class Poche
                 $themes = $this->getInstalledThemes();
                 $languages = $this->getInstalledLanguages();
                 $token = $this->user->getConfigValue('token');
-                $http_auth = (isset($_SERVER['PHP_AUTH_USER']))?true:false;
+                $http_auth = (isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['REMOTE_USER'])) ? true : false;
                 $tpl_vars = array(
                     'themes' => $themes,
                     'languages' => $languages,
@@ -649,14 +650,18 @@ class Poche
      * it redirects the user to the $referer link
      * @return array
      */
-     private function credentials() {
-         if(isset($_SERVER['PHP_AUTH_USER'])) {
-             return array($_SERVER['PHP_AUTH_USER'],'php_auth');
-         }
-         if(!empty($_POST['login']) && !empty($_POST['password'])) {
-             return array($_POST['login'],$_POST['password']);
-         }
-         return array(false,false);
+    private function credentials() {
+        if(isset($_SERVER['PHP_AUTH_USER'])) {
+            return array($_SERVER['PHP_AUTH_USER'],'php_auth');
+        }
+        if(!empty($_POST['login']) && !empty($_POST['password'])) {
+            return array($_POST['login'],$_POST['password']);
+        }
+        if(isset($_SERVER['REMOTE_USER'])) {
+            return array($_SERVER['REMOTE_USER'],'http_auth');
+        }
+
+        return array(false,false);
      }
 
     /**