Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/harbormaster/view/HarbormasterBuildView.php b/src/applications/harbormaster/view/HarbormasterBuildView.php
index 54f5abe093..f54b1d3ba6 100644
--- a/src/applications/harbormaster/view/HarbormasterBuildView.php
+++ b/src/applications/harbormaster/view/HarbormasterBuildView.php
@@ -1,67 +1,69 @@
<?php
final class HarbormasterBuildView
extends AphrontView {
private $builds = array();
public function setBuilds(array $builds) {
assert_instances_of($builds, 'HarbormasterBuild');
$this->builds = $builds;
return $this;
}
public function getBuilds() {
return $this->builds;
}
public function render() {
return $this->newObjectList();
}
public function newObjectList() {
$viewer = $this->getViewer();
$builds = $this->getBuilds();
$buildables = mpull($builds, 'getBuildable');
$object_phids = mpull($buildables, 'getBuildablePHID');
$initiator_phids = mpull($builds, 'getInitiatorPHID');
$phids = array_mergev(array($initiator_phids, $object_phids));
$phids = array_unique(array_filter($phids));
$handles = $viewer->loadHandles($phids);
$list = new PHUIObjectItemListView();
foreach ($builds as $build) {
$id = $build->getID();
- $initiator = $handles[$build->getInitiatorPHID()];
+
$buildable_object = $handles[$build->getBuildable()->getBuildablePHID()];
$item = id(new PHUIObjectItemView())
->setViewer($viewer)
->setObject($build)
->setObjectName($build->getObjectName())
->setHeader($build->getName())
->setHref($build->getURI())
->setEpoch($build->getDateCreated())
->addAttribute($buildable_object->getName());
- if ($initiator) {
+ $initiator_phid = $build->getInitiatorPHID();
+ if ($initiator_phid) {
+ $initiator = $handles[$initiator_phid];
$item->addByline($initiator->renderLink());
}
$status = $build->getBuildStatus();
$status_icon = HarbormasterBuildStatus::getBuildStatusIcon($status);
$status_color = HarbormasterBuildStatus::getBuildStatusColor($status);
$status_label = HarbormasterBuildStatus::getBuildStatusName($status);
$item->setStatusIcon("{$status_icon} {$status_color}", $status_label);
$list->addItem($item);
}
return $list;
}
}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 26, 4:30 PM (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1215
Default Alt Text
(2 KB)

Event Timeline