diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-06-03 23:36:39 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-06-03 23:36:39 -0400 |
commit | 48ca4574197d3452189eb204324f724dadf6a888 (patch) | |
tree | 20c07a8da7da0b2fecef5255bbcd5e950c7cff42 /lib/item.php | |
parent | 3f35d59911ea3e90c4a47249b4a9e7ca49de2cdb (diff) |
renames some function; changes status of items in the database
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(), ... |