소스 검색

Show only unread when selecting unread

Before, when there was no unread articles, all articles where displayed. This behaviour was not the one intended.
Now, when there is no unread articles, a message is displayed to alert that there is no article.

See #428
Alexis Degrugillier 12 년 전
부모
커밋
867069d099
1개의 변경된 파일0개의 추가작업 그리고 11개의 파일을 삭제
  1. 0 11
      app/Controllers/indexController.php

+ 0 - 11
app/Controllers/indexController.php

@@ -111,9 +111,6 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 					$hasUnread = true;
 					break;
 			}
-			if (!$hasUnread) {
-				$this->view->state = $state = 'all';
-			}
 		}
 
 		$today = @strtotime('today');
@@ -127,14 +124,6 @@ class FreshRSS_index_Controller extends Minz_ActionController {
 		try {
 			$entries = $entryDAO->listWhere($getType, $getId, $state, $order, $nb + 1, $first, $filter, $date_min, $keepHistoryDefault);
 
-			// Si on a récupéré aucun article "non lus"
-			// on essaye de récupérer tous les articles
-			if ($state === 'not_read' && empty($entries)) {
-				Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG);
-				$this->view->state = 'all';
-				$entries = $entryDAO->listWhere($getType, $getId, 'all', $order, $nb, $first, $filter, $date_min, $keepHistoryDefault);
-			}
-
 			if (count($entries) <= $nb) {
 				$this->view->nextId  = '';
 			} else {	//We have more elements for pagination