assorted fixes
This commit is contained in:
parent
494a64eaac
commit
4bee8b5f9d
|
@ -1596,6 +1596,11 @@
|
||||||
$fg_content = false, $bg_content = false) {
|
$fg_content = false, $bg_content = false) {
|
||||||
|
|
||||||
if (!$feed_title) $feed_title = getFeedTitle($link, $feed_id, false);
|
if (!$feed_title) $feed_title = getFeedTitle($link, $feed_id, false);
|
||||||
|
if (!$unread) $unread = getFeedUnread($link, $feed_id);
|
||||||
|
|
||||||
|
if ($unread > 0) $class .= "Unread";
|
||||||
|
|
||||||
|
if (!$icon_file) $icon_file = getFeedIcon($feed_id);
|
||||||
|
|
||||||
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
||||||
$feed_icon = "<img id=\"FIMG-$feed_id\" src=\"$icon_file\">";
|
$feed_icon = "<img id=\"FIMG-$feed_id\" src=\"$icon_file\">";
|
||||||
|
@ -2963,6 +2968,9 @@
|
||||||
|
|
||||||
function getFeedIcon($id) {
|
function getFeedIcon($id) {
|
||||||
switch ($id) {
|
switch ($id) {
|
||||||
|
case 0:
|
||||||
|
return "images/archive.png";
|
||||||
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
return "images/mark_set.gif";
|
return "images/mark_set.gif";
|
||||||
break;
|
break;
|
||||||
|
@ -2976,7 +2984,11 @@
|
||||||
return "images/tag.png";
|
return "images/tag.png";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
if ($id < -10) {
|
||||||
|
return "images/label.png";
|
||||||
|
} else {
|
||||||
return ICONS_URL . "/$id.ico";
|
return ICONS_URL . "/$id.ico";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4239,46 +4251,10 @@
|
||||||
printCategoryHeader($link, -1, $cat_hidden, false);
|
printCategoryHeader($link, -1, $cat_hidden, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$num_starred = getFeedUnread($link, -1);
|
foreach (array(-4, 0, -3, -1, -2) as $i) {
|
||||||
$num_published = getFeedUnread($link, -2);
|
printFeedEntry($i, "virt", false, false,
|
||||||
$num_fresh = getFeedUnread($link, -3);
|
false, $link);
|
||||||
$num_total = getFeedUnread($link, -4);
|
}
|
||||||
$num_archive = getFeedUnread($link, 0);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_total > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printFeedEntry(-4, $class, false, $num_total,
|
|
||||||
"images/tag.png", $link);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_archive > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printFeedEntry(0, $class, false, $num_archive,
|
|
||||||
"images/tag.png", $link);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_fresh > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printFeedEntry(-3, $class, false, $num_fresh,
|
|
||||||
"images/fresh.png", $link);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_starred > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printFeedEntry(-1, $class, false, $num_starred,
|
|
||||||
"images/mark_set.png", $link);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_published > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printFeedEntry(-2, $class, false, $num_published,
|
|
||||||
"images/pub_set.gif", $link);
|
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
print "</ul></li>";
|
print "</ul></li>";
|
||||||
|
@ -4307,15 +4283,9 @@
|
||||||
$label_id = -$line['id'] - 11;
|
$label_id = -$line['id'] - 11;
|
||||||
$count = getFeedUnread($link, $label_id);
|
$count = getFeedUnread($link, $label_id);
|
||||||
|
|
||||||
$class = "label";
|
|
||||||
|
|
||||||
if ($count > 0) {
|
|
||||||
$class .= "Unread";
|
|
||||||
}
|
|
||||||
|
|
||||||
printFeedEntry($label_id,
|
printFeedEntry($label_id,
|
||||||
$class, $line["caption"],
|
"label", $line["caption"],
|
||||||
$count, "images/label.png", $link,
|
$count, false, $link,
|
||||||
false, false, false,
|
false, false, false,
|
||||||
$line['fg_color'], $line['bg_color']);
|
$line['fg_color'], $line['bg_color']);
|
||||||
|
|
||||||
|
@ -4425,8 +4395,6 @@
|
||||||
$class = "feed";
|
$class = "feed";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($unread > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
if ($actid == $feed_id) {
|
if ($actid == $feed_id) {
|
||||||
$class .= "Selected";
|
$class .= "Selected";
|
||||||
}
|
}
|
||||||
|
@ -4455,7 +4423,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
printFeedEntry($feed_id, $class, $feed, $unread,
|
printFeedEntry($feed_id, $class, $feed, $unread,
|
||||||
ICONS_URL."/$feed_id.ico", $link, $rtl_content,
|
false, $link, $rtl_content,
|
||||||
$last_updated, $line["last_error"]);
|
$last_updated, $line["last_error"]);
|
||||||
|
|
||||||
++$lnum;
|
++$lnum;
|
||||||
|
|
Loading…
Reference in New Issue