aboutsummaryrefslogtreecommitdiff
path: root/app/models/Entry.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/Entry.php')
-rwxr-xr-xapp/models/Entry.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/app/models/Entry.php b/app/models/Entry.php
index b1d7b8880..001f76b5a 100755
--- a/app/models/Entry.php
+++ b/app/models/Entry.php
@@ -171,6 +171,43 @@ class EntryDAO extends Model_pdo {
}
}
+ public function markReadEntries ($read) {
+ $sql = 'UPDATE entry SET is_read = ?';
+ $stm = $this->bd->prepare ($sql);
+
+ $values = array ($read);
+
+ if ($stm && $stm->execute ($values)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ public function markReadCat ($id, $read) {
+ $sql = 'UPDATE entry e INNER JOIN feed f ON e.id_feed = f.id SET is_read = ? WHERE category = ?';
+ $stm = $this->bd->prepare ($sql);
+
+ $values = array ($read, $id);
+
+ if ($stm && $stm->execute ($values)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ public function markReadFeed ($id, $read) {
+ $sql = 'UPDATE entry SET is_read = ? WHERE id_feed = ?';
+ $stm = $this->bd->prepare ($sql);
+
+ $values = array ($read, $id);
+
+ if ($stm && $stm->execute ($values)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
public function updateEntries ($valuesTmp) {
if (isset ($valuesTmp['content'])) {
$valuesTmp['content'] = base64_encode (gzdeflate (serialize ($valuesTmp['content'])));