]> git.wh0rd.org Git - tt-rss.git/commitdiff
test for veed validity before displaying it in the browser
authorAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Jan 2009 14:32:59 +0000 (15:32 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Tue, 20 Jan 2009 14:32:59 +0000 (15:32 +0100)
modules/pref-feed-browser.php

index 710d14a2c5574efc7b090f1a8a8df02d84ade32a..01d35045803b6a8b56a97665b495d4a236602156 100644 (file)
                                        ORDER BY last_updated $order_fix LIMIT 1");
        
                                $details = db_fetch_assoc($det_result);
+
+                               if ($details) {
                        
-                               $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
-       
-                               if (file_exists($icon_file) && filesize($icon_file) > 0) {
-                                               $feed_icon = "<img class=\"tinyFeedIcon\"       src=\"" . ICONS_URL . 
-                                                       "/".$details["id"].".ico\">";
-                               } else {
-                                       $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
-                               }
-       
-                               $check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB' 
-                                       type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
-       
-                               $class = ($feedctr % 2) ? "even" : "odd";
-       
-                               print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
-                                       "$feed_icon ";
-                                       
-                               print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" . 
-                                       $details["title"] ."</a>&nbsp;" .
-                                       "<span class='subscribers'>($subscribers)</span>";
-                               
-                               print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
-                               print "</div>";
+                                       $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
+               
+                                       if (file_exists($icon_file) && filesize($icon_file) > 0) {
+                                                       $feed_icon = "<img class=\"tinyFeedIcon\"       src=\"" . ICONS_URL . 
+                                                               "/".$details["id"].".ico\">";
+                                       } else {
+                                               $feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
+                                       }
+               
+                                       $check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB' 
+                                               type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
+               
+                                       $class = ($feedctr % 2) ? "even" : "odd";
+               
+                                       print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
+                                               "$feed_icon ";
+                                               
+                                       print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" . 
+                                               $details["title"] ."</a>&nbsp;" .
+                                               "<span class='subscribers'>($subscribers)</span>";
                                        
-                               print "</li>";
-       
-                               ++$feedctr;
+                                       print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
+                                       print "</div>";
+                                               
+                                       print "</li>";
+               
+                                       ++$feedctr;
+                               }
                        }
        
                        print "</ul>";