]> git.wh0rd.org - tt-rss.git/blobdiff - include/sanity_check.php
API: support comments count/url
[tt-rss.git] / include / sanity_check.php
index 26d699be707f95dc320c4e747d13c517eb0ee15a..bf47db8ee3990827e6773203fe206bb489827da0 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-       require_once "functions.php";
-
        function initial_sanity_check($link) {
 
                $errors = array();
@@ -9,18 +7,18 @@
                        array_push($errors, "Configuration file not found. Looks like you forgot to copy config.php-dist to config.php and edit it.");
                } else {
 
-                       define('EXPECTED_CONFIG_VERSION', 25);
-                       define('SCHEMA_VERSION', 91);
-
-                       require_once "config.php";
                        require_once "sanity_config.php";
 
                        if (function_exists('posix_getuid') && posix_getuid() == 0) {
                                array_push($errors, "Please don't run this script as root.");
                        }
 
+                       if (version_compare("5.3.0", phpversion()) == 1) {
+                               array_push($errors, "PHP version 5.3.0 or newer required.");
+                       }
+
                        if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
-                               $array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
+                               array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
                        }
 
                        $purifier_cache_dir = CACHE_DIR . "/htmlpurifier";
                                echo " * $error\n";
                        }
 
-                       echo "\nYou might want to check tt-rss wik or the forums for more information.\n";
+                       echo "\nYou might want to check tt-rss wiki or the forums for more information.\n";
                        echo "Please search the forums before creating new topic for your question.\n";
 
                        exit(-1);