Differential D14503 Diff 35174 src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php
| Show First 20 Lines • Show All 128 Lines • ▼ Show 20 Lines | if ($this->identifiers !== null) { | ||||
| } | } | ||||
| unset($page[$key]); | unset($page[$key]); | ||||
| } | } | ||||
| } | } | ||||
| return $page; | return $page; | ||||
| } | } | ||||
| protected function willFilterPage(array $configs) { | |||||
| $engine_keys = mpull($configs, 'getEngineKey'); | |||||
| $engines = id(new PhabricatorEditEngineQuery()) | |||||
| ->setParentQuery($this) | |||||
| ->setViewer($this->getViewer()) | |||||
| ->withEngineKeys($engine_keys) | |||||
| ->execute(); | |||||
| $engines = mpull($engines, null, 'getEngineKey'); | |||||
| foreach ($configs as $key => $config) { | |||||
| $engine = idx($engines, $config->getEngineKey()); | |||||
| if (!$engine) { | |||||
| $this->didRejectResult($config); | |||||
| unset($configs[$key]); | |||||
| continue; | |||||
| } | |||||
| $config->attachEngine($engine); | |||||
| } | |||||
| return $configs; | |||||
| } | |||||
| protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | protected function buildWhereClauseParts(AphrontDatabaseConnection $conn) { | ||||
| $where = parent::buildWhereClauseParts($conn); | $where = parent::buildWhereClauseParts($conn); | ||||
| if ($this->ids !== null) { | if ($this->ids !== null) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| $conn, | $conn, | ||||
| 'id IN (%Ld)', | 'id IN (%Ld)', | ||||
| $this->ids); | $this->ids); | ||||
| Show All 39 Lines | |||||