diff options
| author | 2014-04-13 08:16:43 -0400 | |
|---|---|---|
| committer | 2014-04-13 08:16:43 -0400 | |
| commit | 3a736e902c5af7f215bbf91dc54be00bf82f8df3 (patch) | |
| tree | c816621869648d7fc541e2b21b132e6f0b45a25f /app/Controllers | |
| parent | 1e032608a61c29a29d418451018b3eb86843f8cf (diff) | |
Move state constants from Configuration to Entry
Diffstat (limited to 'app/Controllers')
| -rw-r--r-- | app/Controllers/importExportController.php | 4 | ||||
| -rwxr-xr-x | app/Controllers/indexController.php | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php index b8253b7bd..3cd791781 100644 --- a/app/Controllers/importExportController.php +++ b/app/Controllers/importExportController.php @@ -370,7 +370,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { $this->view->type = 'starred'; $unread_fav = $this->entryDAO->countUnreadReadFavorites(); $this->view->entries = $this->entryDAO->listWhere( - 's', '', FreshRSS_Configuration::STATE_ALL, 'ASC', + 's', '', FreshRSS_Entry::STATE_ALL, 'ASC', $unread_fav['all'] ); } elseif ($type == 'feed' && !is_null($feed)) { @@ -379,7 +379,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController { ); $this->view->type = 'feed/' . $feed->id(); $this->view->entries = $this->entryDAO->listWhere( - 'f', $feed->id(), FreshRSS_Configuration::STATE_ALL, 'ASC', + 'f', $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC', $this->view->conf->posts_per_page ); $this->view->feed = $feed; diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 52dd01e0a..3445c0bd4 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -85,13 +85,13 @@ class FreshRSS_index_Controller extends Minz_ActionController { $state_param = Minz_Request::param ('state', null); $filter = Minz_Request::param ('search', ''); if (!empty($filter)) { - $state = FreshRSS_Configuration::STATE_ALL; //Search always in read and unread articles + $state = FreshRSS_Entry::STATE_ALL; //Search always in read and unread articles } $this->view->order = $order = Minz_Request::param ('order', $this->view->conf->sort_order); $nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page); $first = Minz_Request::param ('next', ''); - if ($state === FreshRSS_Configuration::STATE_NOT_READ) { //Any unread article in this category at all? + if ($state === FreshRSS_Entry::STATE_NOT_READ) { //Any unread article in this category at all? switch ($getType) { case 'a': $hasUnread = $this->view->nb_not_read > 0; @@ -112,7 +112,7 @@ class FreshRSS_index_Controller extends Minz_ActionController { break; } if (!$hasUnread && ($state_param === null)) { - $this->view->state = $state = FreshRSS_Configuration::STATE_ALL; + $this->view->state = $state = FreshRSS_Entry::STATE_ALL; } } @@ -129,9 +129,9 @@ class FreshRSS_index_Controller extends Minz_ActionController { // Si on a récupéré aucun article "non lus" // on essaye de récupérer tous les articles - if ($state === FreshRSS_Configuration::STATE_NOT_READ && empty($entries) && ($state_param === null)) { + if ($state === FreshRSS_Entry::STATE_NOT_READ && empty($entries) && ($state_param === null)) { Minz_Log::record ('Conflicting information about nbNotRead!', Minz_Log::DEBUG); - $this->view->state = FreshRSS_Configuration::STATE_ALL; + $this->view->state = FreshRSS_Entry::STATE_ALL; $entries = $entryDAO->listWhere($getType, $getId, $this->view->state, $order, $nb, $first, $filter, $date_min, true, $keepHistoryDefault); } |
