]> git.wh0rd.org Git - tt-rss.git/commitdiff
title display fix for NULL category
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 14:01:54 +0000 (15:01 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 4 Mar 2006 14:01:54 +0000 (15:01 +0100)
backend.php

index 977905e5b2bfdafe36df4ee04e5a704228cbea97..04539d1b27ebc3f33399f8eedf04685e43d8bb07 100644 (file)
                        $feed_title = "Global search results ($search)";
                } else if ($search && sprintf("%d", $feed) == 0) {
                        $feed_title = "Feed search results ($search, $feed)";
-               } else if ($feed > 0) {
+               } else if ($feed >= 0) {
 
                        if ($cat_view) {
-                       
-                               $result = db_query($link, "SELECT title FROM ttrss_feed_categories
-                                       WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
-
-                               $feed_title = db_fetch_result($result, 0, "title");
 
+                               if ($feed != 0) {                       
+                                       $result = db_query($link, "SELECT title FROM ttrss_feed_categories
+                                               WHERE id = '$feed' AND owner_uid = " . $_SESSION["uid"]);
+                                       $feed_title = db_fetch_result($result, 0, "title");
+                               } else {
+                                       $feed_title = "Uncategorized";
+                               }
                        } else {
                                
                                $result = db_query($link, "SELECT title,site_url,last_error FROM ttrss_feeds