Fix an issue with PHID/handle management in push logs

Summary: Ref T10751. This cleans this up so it's a little more modern, and fixes a possible bad access on the log detail page.

Test Plan: Viewed push log list, viewed push log detail.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10751

Differential Revision: https://secure.phabricator.com/D15765
This commit is contained in:
epriestley
2016-04-19 20:25:21 -07:00
parent 48b015a3fa
commit b9cf9e6f0d
3 changed files with 16 additions and 25 deletions

View File

@@ -92,25 +92,13 @@ final class PhabricatorRepositoryPushLogSearchEngine
return parent::buildSavedQueryFromBuiltin($query_key);
}
protected function getRequiredHandlePHIDsForResultList(
array $logs,
PhabricatorSavedQuery $query) {
$phids = array();
$phids[] = mpull($logs, 'getPusherPHID');
$phids[] = mpull($logs, 'getDevicePHID');
$phids = array_mergev($phids);
$phids = array_filter($phids);
return $phids;
}
protected function renderResultList(
array $logs,
PhabricatorSavedQuery $query,
array $handles) {
$table = id(new DiffusionPushLogListView())
->setUser($this->requireViewer())
->setHandles($handles)
->setViewer($this->requireViewer())
->setLogs($logs);
return id(new PhabricatorApplicationSearchResultView())