]> git.wh0rd.org Git - tt-rss.git/commitdiff
tag display now works
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 14:12:11 +0000 (15:12 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 14:12:11 +0000 (15:12 +0100)
backend.php
functions.js

index 04539d1b27ebc3f33399f8eedf04685e43d8bb07..60399e31cff06401ad3e3e5960eda5cef60af4bf 100644 (file)
 
                if ($subop == "MarkAllRead")  {
 
-                       if (preg_match("/^[0-9][0-9]*$/", $feed) != false) {
+                       if (preg_match("/^[0-9][0-9]*$/", $feed) != false && $feed >= 0) {
                        
                                if ($cat_view) {
 
                if ($search && $search_mode == "All feeds") {
                        $query_strategy_part = "ttrss_entries.id > 0";
                        $vfeed_query_part = "ttrss_feeds.title AS feed_title,";         
-               } else if (preg_match("/^[0-9][0-9]*$/", $feed) == false) {
+               } else if (preg_match("/^-?[0-9][0-9]*$/", $feed) == false) {
                        $query_strategy_part = "ttrss_entries.id > 0";
                        $vfeed_query_part = "(SELECT title FROM ttrss_feeds WHERE
                                id = feed_id) as feed_title,";
 
                if ($search && $search_mode == "All feeds") {
                        $feed_title = "Global search results ($search)";
-               } else if ($search && sprintf("%d", $feed) == 0) {
+               } else if ($search && preg_match('/^-?[0-9][0-9]*$/', $feed) == false) {
                        $feed_title = "Feed search results ($search, $feed)";
-               } else if ($feed >= 0) {
+               } else if (preg_match('/^-?[0-9][0-9]*$/', $feed) == false) {
+                       $feed_title = $feed;
+               } else if (preg_match('/^-?[0-9][0-9]*$/', $feed) != false && $feed >= 0) {
 
                        if ($cat_view) {
 
 
                print "<div id=\"headlinesContainer\">";
 
-               if (preg_match("/^[0-9][0-9]*$/", $feed) != false) {
+               if (preg_match("/^-?[0-9][0-9]*$/", $feed) != false) {
 
                        if ($feed >= 0) {
                                $feed_kind = "Feeds";
index 14939cdc6a937130155bf2d3a8ea90daebb48845..ac9b55bf351e88695248d69a8339e8d126eb5b28 100644 (file)
@@ -155,7 +155,11 @@ function cleanSelectedList(element) {
        if (!document.getElementById("feedCatHolder")) {
                for (i = 0; i < content.childNodes.length; i++) {
                        var child = content.childNodes[i];
-                       child.className = child.className.replace("Selected", "");
+                       try {
+                               child.className = child.className.replace("Selected", "");
+                       } catch (e) {
+                               //
+                       }
                }
        } else {
                for (i = 0; i < content.childNodes.length; i++) {