summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-09-09 21:44:04 +0400
committerAndrew Dolgov <[email protected]>2010-09-09 21:44:04 +0400
commit1ca8997bcc818bdfa12f3c979b9e0981422cdbc0 (patch)
tree90a9d4ca7d87215c3d332618a10ad5f88a623e34 /modules
parentb41c254984df3fcb9fc7db4bb5218f2391e62164 (diff)
more digest page improvements
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php29
1 files changed, 20 insertions, 9 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index edf2ae2e4..80eda7c3f 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -978,13 +978,31 @@
return;
}
- if ($subop == "digest-init") {
+ if ($subop == "digest-update") {
$feed_id = db_escape_string($_REQUEST['feed_id']);
-
+ $offset = db_escape_string($_REQUEST['offset']);
+
if (!$feed_id) $feed_id = -4;
+ if (!$offset) $offset = 0;
+
print "<rpc-reply>";
+ $headlines = api_get_headlines($link, $feed_id, 10, $offset,
+ '', ($feed_id == -4), true, false, "unread", "updated DESC");
+
+ //function api_get_headlines($link, $feed_id, $limit, $offset,
+ // $filter, $is_cat, $show_excerpt, $show_content, $view_mode) {
+
+ print "<headlines><![CDATA[" . json_encode($headlines) . "]]></headlines>";
+
+ print "</rpc-reply>";
+ return;
+ }
+
+ if ($subop == "digest-init") {
+ print "<rpc-reply>";
+
$tmp_feeds = api_get_feeds($link, false, true, false, 0);
$feeds = array();
@@ -1007,13 +1025,6 @@
print "<feeds><![CDATA[" . json_encode($feeds) . "]]></feeds>";
- $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) {
-
- print "<headlines><![CDATA[" . json_encode($headlines) . "]]></headlines>";
print "</rpc-reply>";
return;
}