- /**
- * Query notices by users associated with this tag from the database.
- *
- * @param integer $offset offset
- * @param integer $limit maximum no of results
- * @param integer $since_id=null since this id
- * @param integer $max_id=null maximum id in result
- *
- * @return array array of notice ids.
- */
-
- function _streamDirect($offset, $limit, $since_id, $max_id)
- {
- $inbox = new Profile_tag_inbox();
-
- $inbox->profile_tag_id = $this->id;
-
- $inbox->selectAdd();
- $inbox->selectAdd('notice_id');
-
- if ($since_id != 0) {
- $inbox->whereAdd('notice_id > ' . $since_id);
- }
-
- if ($max_id != 0) {
- $inbox->whereAdd('notice_id <= ' . $max_id);
- }
-
- $inbox->orderBy('notice_id DESC');
-
- if (!is_null($offset)) {
- $inbox->limit($offset, $limit);
- }
-
- $ids = array();
-
- if ($inbox->find()) {
- while ($inbox->fetch()) {
- $ids[] = $inbox->notice_id;
- }
- }
-
- return $ids;
- }
-