mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-24 17:31:29 +00:00
small digest page improvements
This commit is contained in:
@@ -979,13 +979,17 @@
|
||||
}
|
||||
|
||||
if ($subop == "digest-init") {
|
||||
$feed_id = db_escape_string($_REQUEST['feed_id']);
|
||||
|
||||
if (!$feed_id) $feed_id = -4;
|
||||
|
||||
print "<rpc-reply>";
|
||||
|
||||
$tmp_feeds = api_get_feeds($link, false, true, false, 0);
|
||||
$feeds = array();
|
||||
|
||||
foreach ($tmp_feeds as $f) {
|
||||
if ($f['id'] > 0) array_push($feeds, $f);
|
||||
if ($f['id'] > 0 || $f['id'] == -4) array_push($feeds, $f);
|
||||
}
|
||||
|
||||
function feeds_sort_by_unread_rev($a, $b) {
|
||||
@@ -998,13 +1002,13 @@
|
||||
return ($a < $b) ? 1 : -1;
|
||||
}
|
||||
|
||||
// uasort($feeds, 'feeds_sort_by_unread_rev');
|
||||
// $feeds = array_slice($feeds, 0, 10);
|
||||
//uasort($feeds, 'feeds_sort_by_unread_rev');
|
||||
//$feeds = array_slice($feeds, 0, 10);
|
||||
|
||||
print "<feeds><![CDATA[" . json_encode($feeds) . "]]></feeds>";
|
||||
|
||||
$headlines = api_get_headlines($link, -4, 20, 0,
|
||||
'', true, true, false, "all_articles", "updated DESC");
|
||||
$headlines = api_get_headlines($link, $feed_id, 10, 0,
|
||||
'', ($feed_id == -4), true, false, "all_articles", "updated DESC");
|
||||
|
||||
//function api_get_headlines($link, $feed_id, $limit, $offset,
|
||||
// $filter, $is_cat, $show_excerpt, $show_content, $view_mode) {
|
||||
|
||||
Reference in New Issue
Block a user