id = $id; } function getNoticeIds($offset=0, $limit=20, $since_id=0, $max_id=0) { $notice = new Notice(); $notice->selectAdd(); // clears it $notice->selectAdd('id'); $notice->conversation = $this->id; $notice->orderBy('created DESC, id DESC'); if (!is_null($offset)) { $notice->limit($offset, $limit); } Notice::addWhereSinceId($notice, $since_id); Notice::addWhereMaxId($notice, $max_id); $ids = array(); if ($notice->find()) { while ($notice->fetch()) { $ids[] = $notice->id; } } $notice->free(); $notice = NULL; return $ids; } }