diff options
Diffstat (limited to 'lib/item.php')
-rw-r--r-- | lib/item.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/item.php b/lib/item.php index ad78f07e2..a2ad69b2a 100644 --- a/lib/item.php +++ b/lib/item.php @@ -51,6 +51,16 @@ class OC_News_Item { public function getGuid(){ return $this->guid; + echo $item->getTitle() . ' - '; + if ($item->isRead()) { + echo $l->t('Read'); + } + else { + echo $l->t('Unread'); + } + echo '<br>'; + $item->setRead(); + } public function setGuid($guid){ @@ -66,7 +76,7 @@ class OC_News_Item { } public function setRead(){ - $this->status |= ~StatusFlag::Unread; + $this->status |= ~StatusFlag::Unread; } public function setUnread(){ @@ -81,6 +91,10 @@ class OC_News_Item { return ($this->status & StatusFlag::Important); } + public function setImportant(){ + $this->status |= StatusFlag::Important; + } + /** * NOTE: this is needed to store items in the database, otherwise * the status of an item should be retrieved with methods: isRead(), isImportant(), ... |