]> git.wh0rd.org - tt-rss.git/blobdiff - sanity_check.php
change description of CDM_AUTO_CATCHUP (bump schema)
[tt-rss.git] / sanity_check.php
index 35d5c2a7f89c0f5d9c9ef63ffc71e96ac56626de..83dacb15c00d73b0b32693804d30d2b15674d206 100644 (file)
@@ -2,7 +2,7 @@
        require_once "functions.php";
 
        define('EXPECTED_CONFIG_VERSION', 21);
-       define('SCHEMA_VERSION', 78);
+       define('SCHEMA_VERSION', 80);
 
        if (!file_exists("config.php")) {
                print "<b>Fatal Error</b>: You forgot to copy 
@@ -11,6 +11,7 @@
        }
 
        require_once "config.php";
+       require_once "sanity_config.php";
 
        if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
                $err_msg = "config: your config file version is incorrect. See config.php-dist.\n";
                $err_msg = "config: HTMLPurifier cache directory should be writable by anyone (chmod -R 777 $purifier_cache_dir)";
        }
 
+       if (GENERATED_CONFIG_CHECK != EXPECTED_CONFIG_VERSION) {
+               $err_msg = "config: your sanity_config.php is outdated, please recreate it using ./utils/regen_config_checks.sh";
+       }
+
+       foreach ($requred_defines as $d) {
+               if (!defined($d)) {
+                       $err_msg = "config: required constant $d is not defined. Please check config.php";
+               }
+       }
+
        if (defined('RSS_BACKEND_TYPE')) {
                print "<b>Fatal error</b>: RSS_BACKEND_TYPE is deprecated. Please remove this
                        option from config.php\n";