From 1a45824437af940421c62ec0ddc6132fcd2075c5 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Tue, 15 Apr 2014 17:52:15 +0200 Subject: [PATCH] indicate API access status --- www/index.php | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/www/index.php b/www/index.php index 27deb63..947a1bf 100644 --- a/www/index.php +++ b/www/index.php @@ -12,6 +12,13 @@ if (file_exists(__DIR__ . '/../src/phancap/Autoloader.php')) { include_once 'phancap/Autoloader.php'; } header('HTTP/1.0 200 OK'); + +$options = new Options(); +$config = new Config(); +try { + $config->load(); + $options->setConfig($config); +} catch (\Exception $e) {} ?> @@ -46,6 +53,11 @@ header('HTTP/1.0 200 OK');
Create screenshot
+ access === false) { ?> +
API is disabled
+ access !== true) { ?> +
API requires authentication
+
@@ -90,13 +102,6 @@ header('HTTP/1.0 200 OK'); load(); - $options->setConfig($config); -} catch (\Exception $e) {} - foreach ($options->options as $name => $option) { echo '' . '' . $name . '' -- 2.30.2