From: Andrew Dolgov Date: Mon, 27 Mar 2006 06:03:47 +0000 (+0100) Subject: fix tag display (caused by rtl checking) X-Git-Tag: 1.1.5~34 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2e915ba998d1c37a3d090956f770514c78179593;p=tt-rss.git fix tag display (caused by rtl checking) --- diff --git a/backend.php b/backend.php index 269d8766..d943815c 100644 --- a/backend.php +++ b/backend.php @@ -871,19 +871,25 @@ 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 "