From 6043fb7e201b85e6677680f33660d53abfac1756 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 22 Dec 2005 13:51:12 +0100 Subject: proper handling of failed sanity check in parse_counters + weird getAttribute workaround --- backend.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index f0078888d..31595230d 100644 --- a/backend.php +++ b/backend.php @@ -53,6 +53,8 @@ pg_query("set client_encoding = 'utf-8'"); } + if (!sanity_check($link)) { return; } + $fetch = $_GET["fetch"]; setcookie("ttrss_icons_url", ICONS_URL); @@ -717,18 +719,7 @@ } if ($subop == "sanityCheck") { - - $error_code = 0; - - $result = db_query($link, "SELECT schema_version FROM ttrss_version"); - - $schema_version = db_fetch_result($result, 0, "schema_version"); - - if ($schema_version != SCHEMA_VERSION) { - $error_code = 5; - } - - print ""; + sanity_check(); } if ($subop == "globalPurge") { -- cgit v1.2.3-54-g00ecf