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

This commit is contained in:
Bernhard Posselt 2012-10-14 16:51:12 +02:00
Родитель b5ea253fa6
Коммит 4dd641cb6f
2 изменённых файлов: 16 добавлений и 9 удалений

Просмотреть файл

@ -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');
}
}

14
tests/index.php Normal file
Просмотреть файл

@ -0,0 +1,14 @@
<?php
/**
*
*/
class Test_News_MyTest extends UnitTestCase
{
public function testTest() {
$this->assertTrue(false);
}
}
?>