]> git.wh0rd.org - tt-rss.git/commitdiff
fix bugs introduced by two previous patches
authorAndrew Dolgov <fox@madoka.spb.ru>
Thu, 22 Dec 2005 13:06:15 +0000 (14:06 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Thu, 22 Dec 2005 13:06:15 +0000 (14:06 +0100)
functions.js
functions.php

index b17e8927e70c120f51cf1251ce4577979a34aff9..60fd9da640ef14b4b3e800abcedcf2896d8378de 100644 (file)
@@ -358,7 +358,8 @@ if (!xmlhttp_rpc && typeof XMLHttpRequest!='undefined') {
 function parse_counters(reply, f_document, title_obj) {
        try {
                for (var l = 0; l < reply.childNodes.length; l++) {
-                       if (!reply.childNodes[l] || !reply.childNodes[l].getAttribute) {
+                       if (!reply.childNodes[l] ||
+                               typeof(reply.childNodes[l].getAttribute) == "undefined") {
                                // where did this come from?
                                continue;
                        }
index d34e133aede74f05fd97bebb9b549fbd308d299f..97be0da2a6d28b0455e6147b34f67ec1334c9cf6 100644 (file)
        }
 
        function sanity_check($link) {
-       
+
                $error_code = 0;
                $result = db_query($link, "SELECT schema_version FROM ttrss_version");
                $schema_version = db_fetch_result($result, 0, "schema_version");
                        $error_code = 5;
                }
 
-               print "<error error-code='$error_code'/>";
-
                if ($error_code != 0) {
+                       print "<error error-code='$error_code'/>";
                        return false;
                } else {
                        return true;
-               }
+               } 
        }
 
 ?>