diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-09-01 21:01:39 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-09-01 21:02:00 +0200 |
commit | 37158f214163b73bf45a501b8c1bcaeafe478c7c (patch) | |
tree | 9893ef7ef605686d6ead08acd233abbfd431a824 | |
parent | 50b1b38d038a5def9606fdac4bcd944a65b09da6 (diff) |
corrected param names for load, added enum for types
-rw-r--r-- | ajax/loadfeed.php | 2 | ||||
-rw-r--r-- | js/items.js | 6 | ||||
-rw-r--r-- | lib/feed.php | 7 |
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. */ |