add option to disable setup check
authorChristian Weiske <cweiske@cweiske.de>
Mon, 14 Apr 2014 16:21:01 +0000 (18:21 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 14 Apr 2014 16:21:01 +0000 (18:21 +0200)
src/phancap/Config.php
www/setup.php

index 69b3f0a..bb39da1 100644 (file)
@@ -43,6 +43,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.
      *
index 5a9c389..70c117f 100644 (file)
@@ -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) {