summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-20 15:32:59 +0100
committerAndrew Dolgov <[email protected]>2009-01-20 15:32:59 +0100
commit040ed8c67d7b911ad0a4a0ca15243f23f1173bc6 (patch)
tree7e6e71f041535868338dbd8017aefaafc24f439a /modules
parentec800fe1f28137d7c21471796aa44a2ca97664b8 (diff)
test for veed validity before displaying it in the browser
Diffstat (limited to 'modules')
-rw-r--r--modules/pref-feed-browser.php55
1 files changed, 29 insertions, 26 deletions
diff --git a/modules/pref-feed-browser.php b/modules/pref-feed-browser.php
index 710d14a2c..01d350458 100644
--- a/modules/pref-feed-browser.php
+++ b/modules/pref-feed-browser.php
@@ -181,34 +181,37 @@
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>";