]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix 500 error on missing config.php
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 12 Dec 2011 11:19:34 +0000 (15:19 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 12 Dec 2011 11:19:34 +0000 (15:19 +0400)
include/sanity_check.php
index.php

index 3e5c0980358b25f0d51aa55262f8d777c401c5f7..2769b4b59f480a07d39f7676aeb0a3045e9edf4b 100644 (file)
@@ -1,15 +1,15 @@
 <?php
        require_once "functions.php";
 
-       define('EXPECTED_CONFIG_VERSION', 23);
-       define('SCHEMA_VERSION', 86);
-
        if (!file_exists("config.php")) {
                print "<b>Fatal Error</b>: You forgot to copy
                <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
                exit;
        }
 
+       define('EXPECTED_CONFIG_VERSION', 23);
+       define('SCHEMA_VERSION', 86);
+
        require_once "config.php";
        require_once "sanity_config.php";
 
index 5b5560a9a548a2552edf4746db213bf56f960ec7..76b1d13cfe3f9528b0c6f93de27c1a10c5720742 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,4 +1,10 @@
 <?php
+       if (!file_exists("config.php")) {
+               print "<b>Fatal Error</b>: You forgot to copy
+               <b>config.php-dist</b> to <b>config.php</b> and edit it.\n";
+               exit;
+       }
+
        set_include_path(get_include_path() . PATH_SEPARATOR . "include");
 
        require_once "functions.php";