Differential D25548 Diff 1734 src/applications/differential/query/DifferentialRevisionSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/query/DifferentialRevisionSearchEngine.php
Show First 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | protected function renderResultList( | ||||
$template = id(new DifferentialRevisionListView()) | $template = id(new DifferentialRevisionListView()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setNoBox($this->isPanelContext()); | ->setNoBox($this->isPanelContext()); | ||||
$bucket = $this->getResultBucket($query); | $bucket = $this->getResultBucket($query); | ||||
$unlanded = $this->loadUnlandedDependencies($revisions); | $unlanded = $this->loadUnlandedDependencies($revisions); | ||||
$custom_field_lists = $this->loadCustomFields( | |||||
$revisions, | |||||
PhabricatorCustomField::ROLE_LIST); | |||||
$views = array(); | $views = array(); | ||||
if ($bucket) { | if ($bucket) { | ||||
$bucket->setViewer($viewer); | $bucket->setViewer($viewer); | ||||
try { | try { | ||||
$groups = $bucket->newResultGroups($query, $revisions); | $groups = $bucket->newResultGroups($query, $revisions); | ||||
foreach ($groups as $group) { | foreach ($groups as $group) { | ||||
Show All 16 Lines | protected function renderResultList( | ||||
if (!$views) { | if (!$views) { | ||||
$views[] = id(new DifferentialRevisionListView()) | $views[] = id(new DifferentialRevisionListView()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setNoDataString(pht('No revisions found.')); | ->setNoDataString(pht('No revisions found.')); | ||||
} | } | ||||
foreach ($views as $view) { | foreach ($views as $view) { | ||||
$view->setUnlandedDependencies($unlanded); | $view->setUnlandedDependencies($unlanded); | ||||
$view->setCustomFieldLists($custom_field_lists); | |||||
} | } | ||||
if (count($views) == 1) { | if (count($views) == 1) { | ||||
// Reduce this to a PHUIObjectItemListView so we can get the free | // Reduce this to a PHUIObjectItemListView so we can get the free | ||||
// support from ApplicationSearch. | // support from ApplicationSearch. | ||||
$list = head($views)->render(); | $list = head($views)->render(); | ||||
} else { | } else { | ||||
$list = $views; | $list = $views; | ||||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0