]> git.wh0rd.org Git - tt-rss.git/commitdiff
backend: if fresh=1 parameter to getUnread is present, append output of fresh feed
authorAndrew Dolgov <fox@bah.org.ru>
Wed, 17 Feb 2010 13:22:36 +0000 (16:22 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Wed, 17 Feb 2010 13:22:36 +0000 (16:22 +0300)
backend.php
utils/notifier/manifest.json

index 37c79412ee8b5f1f55f1356185890344cb8e7413..8ccc503afc9aea1d01b17b27137bb554baed8ea9 100644 (file)
 
                case "getUnread":
                        $login = db_escape_string($_REQUEST["login"]);
+                       $fresh = $_REQUEST["fresh"] == "1";
 
                        header("Content-Type: text/plain; charset=utf-8");
 
 
                        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";
                        }
index f0f00953a21e8e4b45a397f3dec1cf72dbf9d54b..206dffd49726159b187a305ef939bd33bf7f6083 100644 (file)
@@ -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://*/*"