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 69b3f0acf20e4ecb74c3823c03092b90d6fff548..bb39da1a326e53637e8627a75e70de94188e0bcd 100644 (file)
@@ -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.
index 5a9c38908ab7c7a8dc96459116942492dbad22e3..70c117fb622f5305197df2707b744ec96520039d 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) {