diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-10-19 14:14:49 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-10-19 14:14:49 -0400 |
commit | f17574c2b053e7fb0fb81f76a05ef3b8d21efa78 (patch) | |
tree | d7ff3fda18694a4893d34d9eed1ac0832e93c075 /controllers/news.controller.php | |
parent | 53fd10a2323eb7a906cb277facff3ae68fbc941a (diff) |
index accepts feedid as parameter; fix to make the search provider work and to have nice urls anyway
Diffstat (limited to 'controllers/news.controller.php')
-rw-r--r-- | controllers/news.controller.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/controllers/news.controller.php b/controllers/news.controller.php index 814f90d10..be3cdbf08 100644 --- a/controllers/news.controller.php +++ b/controllers/news.controller.php @@ -50,10 +50,11 @@ class NewsController extends Controller { $feedMapper = new FeedMapper($this->userId); $itemMapper = new ItemMapper($this->userId); - // always show the last viewed feed on reload - $lastViewedFeedId = (int)$this->getUserValue('lastViewedFeed'); - $lastViewedFeedType = (int)$this->getUserValue('lastViewedFeedType'); - $showAll = $this->getUserValue('showAll'); + // if no feed id is passed as parameter, then show the last viewed feed on reload + $lastViewedFeedId = isset( $_GET['feedid'] ) ? $_GET['feedid'] : (int)$this->getUserValue('lastViewedFeed'); + $lastViewedFeedType = isset( $_GET['feedid'] ) ? FeedType::FEED : (int)$this->getUserValue('lastViewedFeedType'); + + $showAll = $this->getUserValue('showAll'); if( $lastViewedFeedId === null || $lastViewedFeedType === null) { $lastViewedFeedId = $feedMapper->mostRecent(); |