From 76343fb91511b9f53e58b6c01b258bfe00ddb4c6 Mon Sep 17 00:00:00 2001
From: Lukas Fleischer
Date: Fri, 24 Oct 2014 08:31:47 +0200
Subject: Use an INI-style configuration file
Replace web/lib/config.inc.php with an INI-style configuration file.
This allows us to get rid of several globals and makes it easier to use
the same configuration file in external scripts.
Signed-off-by: Lukas Fleischer
---
web/html/login.php | 9 +++++----
web/html/pkgsubmit.php | 8 ++++----
2 files changed, 9 insertions(+), 8 deletions(-)
(limited to 'web/html')
diff --git a/web/html/login.php b/web/html/login.php
index e458fec..dba3af5 100644
--- a/web/html/login.php
+++ b/web/html/login.php
@@ -5,7 +5,8 @@ include_once("aur.inc.php");
set_lang();
check_sid();
-if (!$DISABLE_HTTP_LOGIN || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
+$disable_http_login = config_get_bool('options', 'disable_http_login');
+if (!$disable_http_login || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) {
$login = try_login();
$login_error = $login['error'];
}
@@ -19,7 +20,7 @@ html_header('AUR ' . __("Login"));
= __("Logged-in as: %s", '' . username_from_sid($_COOKIE["AURSID"]) . ''); ?>
[= __("Logout"); ?>]
-
+