From: Christian Weiske Date: Tue, 15 Apr 2014 15:52:15 +0000 (+0200) Subject: indicate API access status X-Git-Tag: v0.1.0~4 X-Git-Url: https://git.cweiske.de/phancap.git/commitdiff_plain/1a45824437af940421c62ec0ddc6132fcd2075c5 indicate API access status --- 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 . ''