implement recently read vfeed (-6)

This commit is contained in:
Andrew Dolgov 2012-08-27 10:08:11 +04:00
parent da1da2e4d8
commit 5417fbd77e
3 changed files with 13 additions and 3 deletions

View File

@ -110,7 +110,7 @@ class Pref_Feeds extends Handler_Protected {
$cat['items'] = array();
}
foreach (array(-4, -3, -1, -2, 0) as $i) {
foreach (array(-4, -3, -1, -2, 0, -6) as $i) {
array_push($cat['items'], $this->feedlist_init_feed($i));
}

BIN
images/recently_read.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1551,7 +1551,9 @@
if ($is_cat) {
return getCategoryUnread($link, $n_feed, $owner_uid);
} if ($feed != "0" && $n_feed == 0) {
} else if ($n_feed == -6) {
return 0;
} else if ($feed != "0" && $n_feed == 0) {
$feed = db_escape_string($feed);
@ -2077,6 +2079,9 @@
case -4:
return "images/tag.png";
break;
case -6:
return "images/recently_read.png";
break;
default:
if ($id < -10) {
return "images/label.png";
@ -2099,6 +2104,8 @@
return __("All articles");
} else if ($id === 0 || $id === "0") {
return __("Archived articles");
} else if ($id == -6) {
return __("Recently read");
} else if ($id < -10) {
$label_id = -$id - 11;
$result = db_query($link, "SELECT caption FROM ttrss_labels2 WHERE id = '$label_id'");
@ -2458,7 +2465,10 @@
ttrss_user_labels2.article_id = ref_id";
}
} else if ($feed == -6) { // recently read
$query_strategy_part = "unread = false";
$vfeed_query_part = "ttrss_feeds.title AS feed_title,";
$override_order = "last_read DESC";
} else if ($feed == -3) { // fresh virtual feed
$query_strategy_part = "unread = true AND score >= 0";