diff options
| author | 2014-09-19 09:07:11 +0200 | |
|---|---|---|
| committer | 2014-09-19 09:07:11 +0200 | |
| commit | ffbfbb92cc89c5ae07e0a28ee3477fcd0c44505d (patch) | |
| tree | 827469859e1300f3525196658b7191fa1dbb40f9 /app/Models | |
| parent | 4fd1478e82dabaa042f4e80d4b9b2830f29a7da8 (diff) | |
| parent | 2f5304a1f7052bce1315f2ed85141568f0995e7c (diff) | |
Merge branch 'dev' of https://github.com/marienfressinaud/FreshRSS into dev
Diffstat (limited to 'app/Models')
| -rw-r--r-- | app/Models/Configuration.php | 13 | ||||
| -rw-r--r-- | app/Models/Entry.php | 2 | ||||
| -rw-r--r-- | app/Models/EntryDAO.php | 3 | ||||
| -rw-r--r-- | app/Models/FeedDAO.php | 2 |
4 files changed, 18 insertions, 2 deletions
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 830d39f0d..f94d82402 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -142,7 +142,18 @@ class FreshRSS_Configuration { } } public function _default_view ($value) { - $this->data['default_view'] = $value === FreshRSS_Entry::STATE_ALL ? FreshRSS_Entry::STATE_ALL : FreshRSS_Entry::STATE_NOT_READ; + switch ($value) { + case FreshRSS_Entry::STATE_ALL: + // left blank on purpose + case FreshRSS_Entry::STATE_NOT_READ: + // left blank on purpose + case FreshRSS_Entry::STATE_NOT_READ_STRICT: + $this->data['default_view'] = $value; + break; + default: + $this->data['default_view'] = FreshRSS_Entry::STATE_ALL; + break; + } } public function _display_posts ($value) { $this->data['display_posts'] = ((bool)$value) && $value !== 'no'; diff --git a/app/Models/Entry.php b/app/Models/Entry.php index 0bf1f2616..5f1c8abc4 100644 --- a/app/Models/Entry.php +++ b/app/Models/Entry.php @@ -6,6 +6,8 @@ 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; private $id = 0; private $guid; diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 75a8aeba4..dee49212d 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -338,6 +338,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo { 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 '; diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php index 756b1f008..b89ae2045 100644 --- a/app/Models/FeedDAO.php +++ b/app/Models/FeedDAO.php @@ -331,7 +331,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo { $id_max = intval($date_min) . '000000'; $stm->bindParam(':id_feed', $id, PDO::PARAM_INT); - $stm->bindParam(':id_max', $id_max, PDO::PARAM_INT); + $stm->bindParam(':id_max', $id_max, PDO::PARAM_STR); $stm->bindParam(':keep', $keep, PDO::PARAM_INT); if ($stm && $stm->execute()) { |
