From: Christian Weiske Date: Mon, 14 Apr 2014 16:21:01 +0000 (+0200) Subject: add option to disable setup check X-Git-Tag: v0.1.0~17 X-Git-Url: https://git.cweiske.de/phancap.git/commitdiff_plain/31c1528c8360f721d2949bde37f77eb3d5dc434b add option to disable setup check --- diff --git a/src/phancap/Config.php b/src/phancap/Config.php index 69b3f0a..bb39da1 100644 --- a/src/phancap/Config.php +++ b/src/phancap/Config.php @@ -42,6 +42,12 @@ class Config */ public $access = true; + /** + * Disable the setup check tool + * @var boolean + */ + public $disableSetup = false; + /** * Redirect the browser to the cache URL. * If disabled, the file is directly delivered. diff --git a/www/setup.php b/www/setup.php index 5a9c389..70c117f 100644 --- a/www/setup.php +++ b/www/setup.php @@ -17,6 +17,12 @@ $messages = array(); $config = new Config(); try { $config->load(); + if ($config->disableSetup) { + header('HTTP/1.0 403 Forbidden'); + header('Content-type: text/plain'); + echo "Setup check is disabled.\n"; + exit(1); + } $messages[][] = array('ok', 'Base configuration is ok'); if ($config->access === true) {