Changeset View
Changeset View
Standalone View
Standalone View
src/applications/releeph/query/ReleephProductQuery.php
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | foreach ($projects as $key => $project) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $project->attachRepository($repo); | $project->attachRepository($repo); | ||||
| } | } | ||||
| return $projects; | return $projects; | ||||
| } | } | ||||
| protected function buildWhereClause(AphrontDatabaseConnection $conn_r) { | protected function buildWhereClause(AphrontDatabaseConnection $conn) { | ||||
| $where = array(); | $where = array(); | ||||
| if ($this->active !== null) { | if ($this->active !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'isActive = %d', | 'isActive = %d', | ||||
| (int)$this->active); | (int)$this->active); | ||||
| } | } | ||||
| if ($this->ids !== null) { | if ($this->ids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'id IN (%Ls)', | 'id IN (%Ls)', | ||||
| $this->ids); | $this->ids); | ||||
| } | } | ||||
| if ($this->phids !== null) { | if ($this->phids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'phid IN (%Ls)', | 'phid IN (%Ls)', | ||||
| $this->phids); | $this->phids); | ||||
| } | } | ||||
| if ($this->repositoryPHIDs !== null) { | if ($this->repositoryPHIDs !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn_r, | $conn, | ||||
| 'repositoryPHID IN (%Ls)', | 'repositoryPHID IN (%Ls)', | ||||
| $this->repositoryPHIDs); | $this->repositoryPHIDs); | ||||
| } | } | ||||
| $where[] = $this->buildPagingClause($conn_r); | $where[] = $this->buildPagingClause($conn); | ||||
| return $this->formatWhereClause($where); | return $this->formatWhereClause($conn, $where); | ||||
| } | } | ||||
| public function getOrderableColumns() { | public function getOrderableColumns() { | ||||
| return parent::getOrderableColumns() + array( | return parent::getOrderableColumns() + array( | ||||
| 'name' => array( | 'name' => array( | ||||
| 'column' => 'name', | 'column' => 'name', | ||||
| 'unique' => true, | 'unique' => true, | ||||
| 'reverse' => true, | 'reverse' => true, | ||||
| Show All 19 Lines | |||||