summaryrefslogtreecommitdiffstats
path: root/db/item.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-20 11:05:15 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-20 11:05:15 +0100
commit070abc32e5dd5f64db655330e210178d15a97c72 (patch)
tree0ad613e2dbc0c9029bda6d019fccebb0ac659d1d /db/item.php
parentfa3a2e469db519571fa7dc13bc832e7de1f8057f (diff)
finished item
Diffstat (limited to 'db/item.php')
-rw-r--r--db/item.php55
1 files changed, 27 insertions, 28 deletions
diff --git a/db/item.php b/db/item.php
index 66ee0ef7e..4eaa294d3 100644
--- a/db/item.php
+++ b/db/item.php
@@ -36,7 +36,8 @@ class Item extends Entity {
public $author;
public $date;
public $feedTitle;
- public $enclosure;
+ public $enclosureMime;
+ public $enclosureLink;
public function setRead() {
$this->markFieldUpdated('status');
@@ -44,7 +45,31 @@ class Item extends Entity {
}
public function isRead() {
- return !($this->status & StatusFlag::UNREAD);
+ return !(($this->status & StatusFlag::UNREAD) === StatusFlag::UNREAD);
+ }
+
+ public function setUnread() {
+ $this->status |= StatusFlag::UNREAD;
+ }
+
+ public function isUnread() {
+ return !$this->isRead();
+ }
+
+ public function setStarred() {
+ $this->status |= StatusFlag::STARRED;
+ }
+
+ public function isStarred() {
+ return ($this->status & StatusFlag::STARRED) === StatusFlag::STARRED;
+ }
+
+ public function setUnstarred() {
+ $this->status &= ~StatusFlag::STARRED;
+ }
+
+ public function isUnstarred() {
+ return !$this->isStarred();
}
}
@@ -77,32 +102,6 @@ class Item extends Entity {
$this->id = $id;
}
}
-
-
-
-
-
-
-
- public function setUnread() {
- $this->status |= StatusFlag::UNREAD;
- }
-
-
-
- public function setImportant() {
- $this->status |= StatusFlag::IMPORTANT;
- }
-
- public function setUnimportant() {
- $this->status &= ~StatusFlag::IMPORTANT;
- }
-
- public function isImportant() {
- return ($this->status & StatusFlag::IMPORTANT);
- }
-
-
public function getBody() {