Changeset View
Changeset View
Standalone View
Standalone View
src/applications/chatlog/query/PhabricatorChatLogChannelQuery.php
| Show All 27 Lines | $data = queryfx_all( | ||||
| $this->buildOrderClause($conn_r), | $this->buildOrderClause($conn_r), | ||||
| $this->buildLimitClause($conn_r)); | $this->buildLimitClause($conn_r)); | ||||
| $logs = $table->loadAllFromArray($data); | $logs = $table->loadAllFromArray($data); | ||||
| return $logs; | return $logs; | ||||
| } | } | ||||
| protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
| $where = array(); | $where = array(); | ||||
| $where[] = $this->buildPagingClause($conn_r); | $where[] = $this->buildPagingClause($conn); | ||||
| if ($this->channelIDs) { | if ($this->channelIDs) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'id IN (%Ld)', | 'id IN (%Ld)', | ||||
| $this->channelIDs); | $this->channelIDs); | ||||
| } | } | ||||
| if ($this->channels) { | if ($this->channels) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'channelName IN (%Ls)', | 'channelName IN (%Ls)', | ||||
| $this->channels); | $this->channels); | ||||
| } | } | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| public function getQueryApplicationClass() { | public function getQueryApplicationClass() { | ||||
| return 'PhabricatorChatLogApplication'; | return 'PhabricatorChatLogApplication'; | ||||
| } | } | ||||
| } | } | ||||