]> git.wh0rd.org - tt-rss.git/commitdiff
do not perform sanity checks on each backend request
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 10 Jul 2012 11:24:04 +0000 (15:24 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 10 Jul 2012 11:24:04 +0000 (15:24 +0400)
backend.php
include/functions.php
include/sanity_check.php

index efc3793d303213ff0c0ef349392f988b52383653..0b0fdba4cb5c8c425f08f596fe619dec184e2fa7 100644 (file)
@@ -39,7 +39,6 @@
 
        require_once "functions.php";
        require_once "sessions.php";
-       require_once "sanity_check.php";
        require_once "config.php";
        require_once "db.php";
        require_once "db-prefs.php";
                5 => __("Power User"),
                10 => __("Administrator"));
 
-       $error = sanity_check($link);
+       #$error = sanity_check($link);
 
-       if ($error['code'] != 0 && $op != "logout") {
-               print json_encode(array("error" => $error));
-               return;
-       }
+       #if ($error['code'] != 0 && $op != "logout") {
+       #       print json_encode(array("error" => $error));
+       #       return;
+       #}
 
        function __autoload($class) {
                $file = "classes/".strtolower(basename($class)).".php";
index c98de2613f20c094ec04afa85559f1e6abfb635c..a3de2461d5472b9ecd280ec32695801087fbb32d 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+       define('EXPECTED_CONFIG_VERSION', 25);
+       define('SCHEMA_VERSION', 92);
+
        date_default_timezone_set('UTC');
        if (defined('E_DEPRECATED')) {
                error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
index 039a36ca08ba86829584caf38a220b6e54fd0cb6..80ca7822f02c62110c96e9ef67f9497676cebdca 100644 (file)
@@ -1,6 +1,4 @@
 <?php
-       require_once "functions.php";
-
        function initial_sanity_check($link) {
 
                $errors = array();
@@ -9,10 +7,6 @@
                        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', 92);
-
-                       require_once "config.php";
                        require_once "sanity_config.php";
 
                        if (function_exists('posix_getuid') && posix_getuid() == 0) {
@@ -20,7 +14,7 @@
                        }
 
                        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";