diff options
Diffstat (limited to 'inc/poche')
-rw-r--r-- | inc/poche/Poche.class.php | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index adec9b28..4b26574d 100644 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -446,7 +446,7 @@ class Poche | |||
446 | $themes = $this->getInstalledThemes(); | 446 | $themes = $this->getInstalledThemes(); |
447 | $languages = $this->getInstalledLanguages(); | 447 | $languages = $this->getInstalledLanguages(); |
448 | $token = $this->user->getConfigValue('token'); | 448 | $token = $this->user->getConfigValue('token'); |
449 | $http_auth = (isset($_SERVER['PHP_AUTH_USER']))?true:false; | 449 | $http_auth = (isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['REMOTE_USER'])) ? true : false; |
450 | $tpl_vars = array( | 450 | $tpl_vars = array( |
451 | 'themes' => $themes, | 451 | 'themes' => $themes, |
452 | 'languages' => $languages, | 452 | 'languages' => $languages, |
@@ -649,14 +649,18 @@ class Poche | |||
649 | * it redirects the user to the $referer link | 649 | * it redirects the user to the $referer link |
650 | * @return array | 650 | * @return array |
651 | */ | 651 | */ |
652 | private function credentials() { | 652 | private function credentials() { |
653 | if(isset($_SERVER['PHP_AUTH_USER'])) { | 653 | if(isset($_SERVER['PHP_AUTH_USER'])) { |
654 | return array($_SERVER['PHP_AUTH_USER'],'php_auth'); | 654 | return array($_SERVER['PHP_AUTH_USER'],'php_auth'); |
655 | } | 655 | } |
656 | if(!empty($_POST['login']) && !empty($_POST['password'])) { | 656 | if(!empty($_POST['login']) && !empty($_POST['password'])) { |
657 | return array($_POST['login'],$_POST['password']); | 657 | return array($_POST['login'],$_POST['password']); |
658 | } | 658 | } |
659 | return array(false,false); | 659 | if(isset($_SERVER['REMOTE_USER'])) { |
660 | return array($_SERVER['REMOTE_USER'],'http_auth'); | ||
661 | } | ||
662 | |||
663 | return array(false,false); | ||
660 | } | 664 | } |
661 | 665 | ||
662 | /** | 666 | /** |