summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ajax/loadfeed.php2
-rw-r--r--js/items.js6
-rw-r--r--lib/feed.php7
3 files changed, 11 insertions, 4 deletions
diff --git a/ajax/loadfeed.php b/ajax/loadfeed.php
index adcdb6f07..51c0a5070 100644
--- a/ajax/loadfeed.php
+++ b/ajax/loadfeed.php
@@ -17,7 +17,7 @@ OCP\JSON::callCheck();
$userid = OCP\USER::getUser();
-$feedId = trim($_POST['feedId']);
+$feedId = $_POST['id'];
OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'lastViewedFeed', $feedId);
diff --git a/js/items.js b/js/items.js
index e3936d1a5..c41e67d50 100644
--- a/js/items.js
+++ b/js/items.js
@@ -80,9 +80,9 @@ var t = t || function(app, string){ return string; }; // mock translation for lo
Items.prototype.load = function(type, id, onSuccessCallback) {
var self = this;
var data = {
- feedId: id,
- feedType: type,
- getMostRecentItemId: this._itemCache.getMostRecentItemId(type, id)
+ id: id,
+ type: type,
+ mostRecentItemId: this._itemCache.getMostRecentItemId(type, id)
};
this._$articleList.addClass('loading');
diff --git a/lib/feed.php b/lib/feed.php
index 6dfdcbcfb..9a9226d73 100644
--- a/lib/feed.php
+++ b/lib/feed.php
@@ -12,6 +12,13 @@
namespace OCA\News;
+class FeedType {
+ const FEED = 0;
+ const FOLDER = 1;
+ const STARRED = 2;
+ const SUBSCRIPTIONS = 3;
+}
+
/**
* This class models a feed.
*/