Differential D17004 Diff 41390 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 149 Lines • ▼ Show 20 Lines | protected function renderResultList( | ||||
| $template = id(new DifferentialRevisionListView()) | $template = id(new DifferentialRevisionListView()) | ||||
| ->setUser($viewer) | ->setUser($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 19 Lines | if ($phids) { | ||||
| ->execute(); | ->execute(); | ||||
| } else { | } else { | ||||
| $handles = array(); | $handles = array(); | ||||
| } | } | ||||
| foreach ($views as $view) { | foreach ($views as $view) { | ||||
| $view->setHandles($handles); | $view->setHandles($handles); | ||||
| $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 81 Lines • Show Last 20 Lines | |||||