From 1f7b77d1681626cb2071e29692be68d2dbd18b81 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Feb 2010 16:22:36 +0300 Subject: [PATCH] backend: if fresh=1 parameter to getUnread is present, append output of fresh feed --- backend.php | 8 ++++++++ utils/notifier/manifest.json | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/backend.php b/backend.php index 37c79412..8ccc503a 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"; } diff --git a/utils/notifier/manifest.json b/utils/notifier/manifest.json index f0f00953..206dffd4 100644 --- a/utils/notifier/manifest.json +++ b/utils/notifier/manifest.json @@ -1,14 +1,13 @@ { "name": "Tiny Tiny RSS Notifier", "background_page": "background.html", - "version": "0.2", + "version": "0.2.1", "description": "This extension displays the number of unread articles in your Tiny Tiny RSS installation", "options_page": "options.html", "icons": { "48": "images/icon.png", "128": "images/icon.png" }, "browser_action": { "default_icon": "images/normal.png", - "default_title": "You have no unread articles.", - "popup.disabled": "popup.html" + "default_title": "You have no unread articles." }, "permissions": [ "tabs", "http://*/*", "https://*/*" -- 2.39.5