]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix tag display (caused by rtl checking)
authorAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 06:03:47 +0000 (07:03 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Mon, 27 Mar 2006 06:03:47 +0000 (07:03 +0100)
backend.php

index 269d876694fe05fcd0e16a786b1fc399afe9a6b5..d943815c3b9b8d2cc1b4aa165ecebc17edfdd914 100644 (file)
                                        type=\"text/css\" href=\"tt-rss_compact.css\"/>";
                }
 
-               $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
-                       WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
-
-               if (db_num_rows($result) == 1) {
-                       $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
-               } else {
-                       $rtl_content = false;
-               }
+               if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) {
+       
+                       $result = db_query($link, "SELECT rtl_content FROM ttrss_feeds
+                               WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
 
-               if ($rtl_content) {
-                       $rtl_tag = "dir=\"RTL\"";
+                       if (db_num_rows($result) == 1) {
+                               $rtl_content = sql_bool_to_bool(db_fetch_result($result, 0, "rtl_content"));
+                       } else {
+                               $rtl_content = false;
+                       }
+       
+                       if ($rtl_content) {
+                               $rtl_tag = "dir=\"RTL\"";
+                       } else {
+                               $rtl_tag = "";
+                       }
                } else {
                        $rtl_tag = "";
+                       $rtl_content = false;
                }
 
                print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">