diff options
Diffstat (limited to 'inc/poche/Poche.class.php')
-rwxr-xr-x | inc/poche/Poche.class.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 15d83bfe..9014f455 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php | |||
@@ -448,8 +448,9 @@ class Poche | |||
448 | $themes = $this->tpl->getInstalledThemes(); | 448 | $themes = $this->tpl->getInstalledThemes(); |
449 | $languages = $this->language->getInstalledLanguages(); | 449 | $languages = $this->language->getInstalledLanguages(); |
450 | $token = $this->user->getConfigValue('token'); | 450 | $token = $this->user->getConfigValue('token'); |
451 | $http_auth = (isset($_SERVER['PHP_AUTH_USER']) || isset($_SERVER['REMOTE_USER'])) ? true : false; | 451 | $http_auth = isset($_SERVER['REMOTE_USER']); |
452 | $only_user = ($this->store->listUsers() > 1) ? false : true; | 452 | $only_user = ($this->store->listUsers() > 1) ? false : true; |
453 | $https = substr(Tools::getPocheUrl(), 0, 5) == 'https'; | ||
453 | $tpl_vars = array( | 454 | $tpl_vars = array( |
454 | 'themes' => $themes, | 455 | 'themes' => $themes, |
455 | 'languages' => $languages, | 456 | 'languages' => $languages, |
@@ -462,7 +463,8 @@ class Poche | |||
462 | 'token' => $token, | 463 | 'token' => $token, |
463 | 'user_id' => $this->user->getId(), | 464 | 'user_id' => $this->user->getId(), |
464 | 'http_auth' => $http_auth, | 465 | 'http_auth' => $http_auth, |
465 | 'only_user' => $only_user | 466 | 'only_user' => $only_user, |
467 | 'https' => $https | ||
466 | ); | 468 | ); |
467 | Tools::logm('config view'); | 469 | Tools::logm('config view'); |
468 | break; | 470 | break; |
@@ -653,9 +655,6 @@ class Poche | |||
653 | */ | 655 | */ |
654 | private function credentials() | 656 | private function credentials() |
655 | { | 657 | { |
656 | if (isset($_SERVER['PHP_AUTH_USER'])) { | ||
657 | return array($_SERVER['PHP_AUTH_USER'], 'php_auth', true); | ||
658 | } | ||
659 | if (!empty($_POST['login']) && !empty($_POST['password'])) { | 658 | if (!empty($_POST['login']) && !empty($_POST['password'])) { |
660 | return array($_POST['login'], $_POST['password'], false); | 659 | return array($_POST['login'], $_POST['password'], false); |
661 | } | 660 | } |