Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/query/PholioImageQuery.php
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | $data = queryfx_all( | ||||
| $this->buildOrderClause($conn_r), | $this->buildOrderClause($conn_r), | ||||
| $this->buildLimitClause($conn_r)); | $this->buildLimitClause($conn_r)); | ||||
| $images = $table->loadAllFromArray($data); | $images = $table->loadAllFromArray($data); | ||||
| return $images; | return $images; | ||||
| } | } | ||||
| 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->ids) { | if ($this->ids) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'id IN (%Ld)', | 'id IN (%Ld)', | ||||
| $this->ids); | $this->ids); | ||||
| } | } | ||||
| if ($this->phids) { | if ($this->phids) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'phid IN (%Ls)', | 'phid IN (%Ls)', | ||||
| $this->phids); | $this->phids); | ||||
| } | } | ||||
| if ($this->mockIDs) { | if ($this->mockIDs) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'mockID IN (%Ld)', | 'mockID IN (%Ld)', | ||||
| $this->mockIDs); | $this->mockIDs); | ||||
| } | } | ||||
| if ($this->obsolete !== null) { | if ($this->obsolete !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'isObsolete = %d', | 'isObsolete = %d', | ||||
| $this->obsolete); | $this->obsolete); | ||||
| } | } | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| protected function willFilterPage(array $images) { | protected function willFilterPage(array $images) { | ||||
| assert_instances_of($images, 'PholioImage'); | assert_instances_of($images, 'PholioImage'); | ||||
| if ($this->getMockCache()) { | if ($this->getMockCache()) { | ||||
| $mocks = $this->getMockCache(); | $mocks = $this->getMockCache(); | ||||
| } else { | } else { | ||||
| ▲ Show 20 Lines • Show All 63 Lines • Show Last 20 Lines | |||||