diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-14 16:51:12 +0200 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2012-10-14 16:51:12 +0200 |
commit | 4dd641cb6f0b58b228efb9844aa6269434f70140 (patch) | |
tree | e62a7cd80f1c4b64759612c31d268334c6b50bcd | |
parent | b5ea253fa6c4c75d72669007ac16a9556b8055ed (diff) |
fixed a bug that would prevent all new items from being loaded, fixed a bug that would send the wrong starred count to the webinterface
-rw-r--r-- | controllers/news.controller.php | 11 | ||||
-rw-r--r-- | tests/index.php | 14 |
2 files changed, 16 insertions, 9 deletions
diff --git a/controllers/news.controller.php b/controllers/news.controller.php index 817983f6a..14bef126e 100644 --- a/controllers/news.controller.php +++ b/controllers/news.controller.php @@ -106,7 +106,7 @@ class NewsController extends Controller { $itemMapper = new ItemMapper($this->userId); // starred or subscriptions - if ($feedType === FeedType::STARRED || $feedId === FeedType::SUBSCRIPTIONS) { + if ($feedType === FeedType::STARRED || $feedType === FeedType::SUBSCRIPTIONS) { if($feedType === FeedType::STARRED){ $statusFlag = StatusFlag::IMPORTANT; @@ -141,7 +141,6 @@ class NewsController extends Controller { } } } - return $items; } @@ -158,7 +157,7 @@ class NewsController extends Controller { switch ($feedType) { case FeedType::STARRED: - $unreadCount = $itemMapper->countAllStatus($feedId, StatusFlag::IMPORTANT); + $unreadCount = $itemMapper->countEveryItemByStatus(StatusFlag::IMPORTANT); break; case FeedType::SUBSCRIPTIONS: @@ -181,12 +180,6 @@ class NewsController extends Controller { return $unreadCount; } - public function javascriptTests(){ - $this->add3rdPartyScript('jasmine-1.2.0/jasmine.js'); - $this->add3rdPartyStyle('jasmine-1.2.0/jasmine.css'); - $this->render('javascript.tests'); - } - } diff --git a/tests/index.php b/tests/index.php new file mode 100644 index 000000000..69c99ce13 --- /dev/null +++ b/tests/index.php @@ -0,0 +1,14 @@ +<?php + +/** +* +*/ +class Test_News_MyTest extends UnitTestCase +{ + + public function testTest() { + $this->assertTrue(false); + } +} + +?>
\ No newline at end of file |