summaryrefslogtreecommitdiffstats
path: root/db/statusflag.php
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-23 13:24:35 +0100
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-23 13:24:35 +0100
commit3455fe9cb792e584671f465ff6d51732fc1802ff (patch)
tree817a26f6d03bed8939c0842a63ca5349e28ed099 /db/statusflag.php
parentf4f27ab927f16d7ff8900e92ecf7aee75f355f34 (diff)
finished findall methods in itembl
Diffstat (limited to 'db/statusflag.php')
-rw-r--r--db/statusflag.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/db/statusflag.php b/db/statusflag.php
index eccf1e199..96d64915b 100644
--- a/db/statusflag.php
+++ b/db/statusflag.php
@@ -30,4 +30,26 @@ class StatusFlag {
const STARRED = 0x04;
const DELETED = 0x08;
const UPDATED = 0x16;
+
+
+ /**
+ * Get status for query
+ */
+ public function typeToStatus($type, $showAll){
+ if($type === FeedType::STARRED){
+ $status = self::STARRED;
+ } else {
+ $status = 0;
+ }
+
+ if($showAll){
+ $status |= self::UNREAD;
+ } else {
+ $status &= ~self::UNREAD;
+ }
+
+ return $status;
+ }
+
+
} \ No newline at end of file