diff options
Diffstat (limited to 'db/statusflag.php')
-rw-r--r-- | db/statusflag.php | 22 |
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 |