Changeset View
Changeset View
Standalone View
Standalone View
src/applications/tokens/query/PhabricatorTokenCountQuery.php
| Show All 18 Lines | $rows = queryfx_all( | ||||
| 'SELECT objectPHID, tokenCount FROM %T %Q %Q', | 'SELECT objectPHID, tokenCount FROM %T %Q %Q', | ||||
| $table->getTableName(), | $table->getTableName(), | ||||
| $this->buildWhereClause($conn_r), | $this->buildWhereClause($conn_r), | ||||
| $this->buildLimitClause($conn_r)); | $this->buildLimitClause($conn_r)); | ||||
| return ipull($rows, 'tokenCount', 'objectPHID'); | return ipull($rows, 'tokenCount', 'objectPHID'); | ||||
| } | } | ||||
| protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
| $where = array(); | $where = array(); | ||||
| if ($this->objectPHIDs) { | if ($this->objectPHIDs) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'objectPHID IN (%Ls)', | 'objectPHID IN (%Ls)', | ||||
| $this->objectPHIDs); | $this->objectPHIDs); | ||||
| } | } | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| } | } | ||||