Differential D20179 Diff 48188 src/applications/harbormaster/controller/HarbormasterUnitMessageListController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/harbormaster/controller/HarbormasterUnitMessageListController.php
Show All 25 Lines | public function handleRequest(AphrontRequest $request) { | ||||
foreach ($buildable->getBuilds() as $build) { | foreach ($buildable->getBuilds() as $build) { | ||||
foreach ($build->getBuildTargets() as $target) { | foreach ($build->getBuildTargets() as $target) { | ||||
$target_phids[] = $target->getPHID(); | $target_phids[] = $target->getPHID(); | ||||
} | } | ||||
} | } | ||||
$unit_data = array(); | $unit_data = array(); | ||||
if ($target_phids) { | if ($target_phids) { | ||||
$unit_data = id(new HarbormasterBuildUnitMessage())->loadAllWhere( | $unit_data = id(new HarbormasterBuildUnitMessageQuery()) | ||||
'buildTargetPHID IN (%Ls)', | ->setViewer($viewer) | ||||
$target_phids); | ->withBuildTargetPHIDs($target_phids) | ||||
->execute(); | |||||
} else { | } else { | ||||
$unit_data = array(); | $unit_data = array(); | ||||
} | } | ||||
$unit = id(new HarbormasterUnitSummaryView()) | $unit = id(new HarbormasterUnitSummaryView()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setBuildable($buildable) | ->setBuildable($buildable) | ||||
->setUnitMessages($unit_data); | ->setUnitMessages($unit_data); | ||||
Show All 28 Lines |