Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/query/HarbormasterBuildQuery.php
| Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | if ($plan_phids) { | ||||
| $plans = mpull($plans, null, 'getPHID'); | $plans = mpull($plans, null, 'getPHID'); | ||||
| } | } | ||||
| foreach ($page as $key => $build) { | foreach ($page as $key => $build) { | ||||
| $plan_phid = $build->getBuildPlanPHID(); | $plan_phid = $build->getBuildPlanPHID(); | ||||
| $build->attachBuildPlan(idx($plans, $plan_phid)); | $build->attachBuildPlan(idx($plans, $plan_phid)); | ||||
| } | } | ||||
| $build_phids = mpull($page, 'getPHID'); | |||||
| $commands = id(new HarbormasterBuildCommand())->loadAllWhere( | |||||
| 'targetPHID IN (%Ls) ORDER BY id ASC', | |||||
| $build_phids); | |||||
| $commands = mgroup($commands, 'getTargetPHID'); | |||||
| foreach ($page as $build) { | |||||
| $unprocessed_commands = idx($commands, $build->getPHID(), array()); | |||||
| $build->attachUnprocessedCommands($unprocessed_commands); | |||||
| } | |||||
| return $page; | return $page; | ||||
| } | } | ||||
| private function buildWhereClause(AphrontDatabaseConnection $conn_r) { | private function buildWhereClause(AphrontDatabaseConnection $conn_r) { | ||||
| $where = array(); | $where = array(); | ||||
| if ($this->ids) { | if ($this->ids) { | ||||
| $where[] = qsprintf( | $where[] = qsprintf( | ||||
| ▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines | |||||