diff options
| author | 2014-09-19 13:40:59 +0200 | |
|---|---|---|
| committer | 2014-09-19 13:40:59 +0200 | |
| commit | 24f7a6559401bf8c1f21082d5401a3bdb3b7c093 (patch) | |
| tree | 7557c80d42d55a3168fefcd519ca00f54e4953f3 /app/Models | |
| parent | 7984e52bbc653ac00b83c513a2acb649f6f28af1 (diff) | |
| parent | 71617080e224b8d3a3397a27b78e1f509499431c (diff) | |
Merge pull request #626 from aledeg/unread-error
Refactor code for strict unread message display
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Configuration.php | 2 | ||||
| -rw-r--r-- | app/Models/Entry.php | 3 | ||||
| -rw-r--r-- | app/Models/EntryDAO.php | 5 |
3 files changed, 4 insertions, 6 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index f94d82402..ea1556cbb 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -147,7 +147,7 @@ class FreshRSS_Configuration { // left blank on purpose case FreshRSS_Entry::STATE_NOT_READ: // left blank on purpose - case FreshRSS_Entry::STATE_NOT_READ_STRICT: + case FreshRSS_Entry::STATE_STRICT + FreshRSS_Entry::STATE_NOT_READ: $this->data['default_view'] = $value; break; default: diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 5f1c8abc4..9d7dd5dc4 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -6,8 +6,7 @@ class FreshRSS_Entry extends Minz_Model { const STATE_NOT_READ = 2; const STATE_FAVORITE = 4; const STATE_NOT_FAVORITE = 8; - const STATE_READ_STRICT = 16; - const STATE_NOT_READ_STRICT = 32; + const STATE_STRICT = 16; private $id = 0; private $guid; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index dee49212d..c1f87ee34 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -333,14 +333,13 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { if ($state & FreshRSS_Entry::STATE_NOT_READ) { if (!($state & FreshRSS_Entry::STATE_READ)) { $where .= 'AND e1.is_read=0 '; + } elseif ($state & FreshRSS_Entry::STATE_STRICT) { + $where .= 'AND e1.is_read=0 '; } } elseif ($state & FreshRSS_Entry::STATE_READ) { $where .= 'AND e1.is_read=1 '; } - elseif ($state & FreshRSS_Entry::STATE_NOT_READ_STRICT) { - $where .= 'AND e1.is_read=0 '; - } if ($state & FreshRSS_Entry::STATE_FAVORITE) { if (!($state & FreshRSS_Entry::STATE_NOT_FAVORITE)) { $where .= 'AND e1.is_favorite=1 '; |
