summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-02-17 16:22:36 +0300
committerAndrew Dolgov <[email protected]>2010-02-17 16:22:36 +0300
commit1f7b77d1681626cb2071e29692be68d2dbd18b81 (patch)
tree2115f95cf2631f743b02a377e1d9aa963ad69e52 /backend.php
parent01701654eb01257ef96882ed5840a29355a353be (diff)
backend: if fresh=1 parameter to getUnread is present, append output of fresh feed
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/backend.php b/backend.php
index 37c79412e..8ccc503af 100644
--- a/backend.php
+++ b/backend.php
@@ -490,6 +490,7 @@
case "getUnread":
$login = db_escape_string($_REQUEST["login"]);
+ $fresh = $_REQUEST["fresh"] == "1";
header("Content-Type: text/plain; charset=utf-8");
@@ -497,7 +498,14 @@
if (db_num_rows($result) == 1) {
$uid = db_fetch_result($result, 0, "id");
+
print getGlobalUnread($link, $uid);
+
+ if ($fresh) {
+ print ";";
+ print getFeedArticles($link, -3, false, true, $uid);
+ }
+
} else {
print "-1;User not found";
}