diff --git a/src/applications/audit/controller/PhabricatorAuditAddCommentController.php b/src/applications/audit/controller/PhabricatorAuditAddCommentController.php index 07becae652..f380d0edff 100644 --- a/src/applications/audit/controller/PhabricatorAuditAddCommentController.php +++ b/src/applications/audit/controller/PhabricatorAuditAddCommentController.php @@ -54,7 +54,7 @@ final class PhabricatorAuditAddCommentController ->addCCs($ccs) ->addComment($comment); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $uri = $handles[$commit_phid]->getURI(); $draft = id(new PhabricatorDraft())->loadOneWhere( diff --git a/src/applications/audit/controller/PhabricatorAuditListController.php b/src/applications/audit/controller/PhabricatorAuditListController.php index 71a1939aa0..061493640a 100644 --- a/src/applications/audit/controller/PhabricatorAuditListController.php +++ b/src/applications/audit/controller/PhabricatorAuditListController.php @@ -228,7 +228,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { } $phids = array($phid); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $handle = $handles[$phid]; $this->validateHandle($handle); @@ -393,7 +393,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { $view->setNoDataString($nodata); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); @@ -485,7 +485,7 @@ final class PhabricatorAuditListController extends PhabricatorAuditController { $view->setNoDataString($nodata); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); diff --git a/src/applications/audit/controller/PhabricatorAuditPreviewController.php b/src/applications/audit/controller/PhabricatorAuditPreviewController.php index 523b7337ad..4d023df8fb 100644 --- a/src/applications/audit/controller/PhabricatorAuditPreviewController.php +++ b/src/applications/audit/controller/PhabricatorAuditPreviewController.php @@ -68,7 +68,7 @@ final class PhabricatorAuditPreviewController $phids = array_merge($phids, $view->getRequiredHandlePHIDs()); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); id(new PhabricatorDraft()) diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php index 457f71d604..3c9991483f 100644 --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -217,10 +217,14 @@ abstract class PhabricatorController extends AphrontController { protected function loadHandles(array $phids) { $phids = array_filter($phids); - $this->handles = id(new PhabricatorObjectHandleData($phids)) + $this->handles = $this->loadViewerHandles($phids); + return $this; + } + + protected function loadViewerHandles(array $phids) { + return id(new PhabricatorObjectHandleData($phids)) ->setViewer($this->getRequest()->getUser()) ->loadHandles(); - return $this; } protected function renderHandlesForPHIDs(array $phids) { diff --git a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php index 493ab6b7c3..9f3bcb3f95 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarBrowseController.php @@ -43,7 +43,7 @@ final class PhabricatorCalendarBrowseController $month_view->setHolidays($holidays); $phids = mpull($statuses, 'getUserPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); foreach ($statuses as $status) { $event = new AphrontCalendarEventView(); diff --git a/src/applications/countdown/controller/PhabricatorCountdownListController.php b/src/applications/countdown/controller/PhabricatorCountdownListController.php index 2291f8f0db..1e22979182 100644 --- a/src/applications/countdown/controller/PhabricatorCountdownListController.php +++ b/src/applications/countdown/controller/PhabricatorCountdownListController.php @@ -36,7 +36,7 @@ final class PhabricatorCountdownListController $timers = $pager->sliceResults($timers); $phids = mpull($timers, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($timers as $timer) { diff --git a/src/applications/differential/controller/DifferentialChangesetViewController.php b/src/applications/differential/controller/DifferentialChangesetViewController.php index 73f03d8cd4..cc21b12e10 100644 --- a/src/applications/differential/controller/DifferentialChangesetViewController.php +++ b/src/applications/differential/controller/DifferentialChangesetViewController.php @@ -203,8 +203,7 @@ final class DifferentialChangesetViewController extends DifferentialController { } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $parser->setHandles($handles); $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine(); diff --git a/src/applications/differential/controller/DifferentialCommentPreviewController.php b/src/applications/differential/controller/DifferentialCommentPreviewController.php index c7d080083e..b02aeb8361 100644 --- a/src/applications/differential/controller/DifferentialCommentPreviewController.php +++ b/src/applications/differential/controller/DifferentialCommentPreviewController.php @@ -59,9 +59,7 @@ final class DifferentialCommentPreviewController $handles = array_merge($handles, $ccs); } - $handles = id(new PhabricatorObjectHandleData($handles)) - ->setViewer($request->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($handles); $view = new DifferentialRevisionCommentView(); $view->setUser($request->getUser()); diff --git a/src/applications/differential/controller/DifferentialRevisionEditController.php b/src/applications/differential/controller/DifferentialRevisionEditController.php index d7b8594406..3442bfeabf 100644 --- a/src/applications/differential/controller/DifferentialRevisionEditController.php +++ b/src/applications/differential/controller/DifferentialRevisionEditController.php @@ -92,8 +92,7 @@ final class DifferentialRevisionEditController extends DifferentialController { } $phids = array_mergev($aux_phids); $phids = array_unique($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); foreach ($aux_fields as $key => $aux_field) { $aux_field->setHandles(array_select_keys($handles, $aux_phids[$key])); } diff --git a/src/applications/differential/controller/DifferentialRevisionListController.php b/src/applications/differential/controller/DifferentialRevisionListController.php index 185facd5ba..7ad4b5356e 100644 --- a/src/applications/differential/controller/DifferentialRevisionListController.php +++ b/src/applications/differential/controller/DifferentialRevisionListController.php @@ -172,9 +172,7 @@ final class DifferentialRevisionListController extends DifferentialController { } $phids = array_mergev(mpull($view_objects, 'getRequiredHandlePHIDs')); $phids[] = $params['phid']; - $handles = id(new PhabricatorObjectHandleData($phids)) - ->setViewer($this->getRequest()->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); foreach ($views as $view) { if (empty($view['special'])) { diff --git a/src/applications/differential/controller/DifferentialRevisionStatsController.php b/src/applications/differential/controller/DifferentialRevisionStatsController.php index 613ba1e4b2..9c8252a381 100644 --- a/src/applications/differential/controller/DifferentialRevisionStatsController.php +++ b/src/applications/differential/controller/DifferentialRevisionStatsController.php @@ -125,8 +125,7 @@ final class DifferentialRevisionStatsController extends DifferentialController { DifferentialAction::ACTION_CLOSE); $panels = array(); - $handles = id(new PhabricatorObjectHandleData(array($params['phid']))) - ->loadHandles(); + $handles = $this->loadViewerHandles(array($params['phid'])); $filter_form = id(new AphrontFormView()) ->setAction('/differential/stats/'.$this->filter.'/') diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 6843a1f243..2600517dee 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -144,9 +144,7 @@ final class DifferentialRevisionViewController extends DifferentialController { $object_phids = array_merge($object_phids, array_mergev($aux_phids)); $object_phids = array_unique($object_phids); - $handles = id(new PhabricatorObjectHandleData($object_phids)) - ->setViewer($this->getRequest()->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($object_phids); foreach ($aux_fields as $key => $aux_field) { // Make sure each field only has access to handles it specifically @@ -883,9 +881,7 @@ final class DifferentialRevisionViewController extends DifferentialController { ->loadAssets(); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->setViewer($this->getRequest()->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); return diff --git a/src/applications/diffusion/controller/DiffusionBrowseController.php b/src/applications/diffusion/controller/DiffusionBrowseController.php index 646acb2c39..e92b46dd47 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseController.php @@ -79,7 +79,7 @@ final class DiffusionBrowseController extends DiffusionController { } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $browse_table = new DiffusionBrowseTableView(); $browse_table->setDiffusionRequest($drequest); diff --git a/src/applications/diffusion/controller/DiffusionCommitController.php b/src/applications/diffusion/controller/DiffusionCommitController.php index 733df84084..7ff19c31a7 100644 --- a/src/applications/diffusion/controller/DiffusionCommitController.php +++ b/src/applications/diffusion/controller/DiffusionCommitController.php @@ -361,8 +361,7 @@ final class DiffusionCommitController extends DiffusionController { $handles = array(); if ($phids) { - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); } $props = array(); @@ -469,7 +468,7 @@ final class DiffusionCommitController extends DiffusionController { $view->setShowDescriptions(false); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $view->setAuthorityPHIDs($this->auditAuthorityPHIDs); $this->highlightedAudits = $view->getHighlightedAudits(); @@ -509,7 +508,7 @@ final class DiffusionCommitController extends DiffusionController { $view->setPathMap($path_map); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); return $view; @@ -757,7 +756,7 @@ final class DiffusionCommitController extends DiffusionController { $history_table->loadRevisions(); $phids = $history_table->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $history_table->setHandles($handles); $panel = new AphrontPanelView(); diff --git a/src/applications/diffusion/controller/DiffusionCommitEditController.php b/src/applications/diffusion/controller/DiffusionCommitEditController.php index fd80837ed6..a1d712ef4f 100644 --- a/src/applications/diffusion/controller/DiffusionCommitEditController.php +++ b/src/applications/diffusion/controller/DiffusionCommitEditController.php @@ -42,8 +42,7 @@ final class DiffusionCommitEditController extends DiffusionController { $commit_phid, $edge_type ); - $handles = id(new PhabricatorObjectHandleData($current_proj_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($current_proj_phids); $proj_t_values = mpull($handles, 'getFullName', 'getPHID'); if ($request->isFormPost()) { diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index ffdc897ed5..ab9e7e1103 100644 --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -141,7 +141,7 @@ abstract class DiffusionController extends PhabricatorController { ->loadAssets(); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); diff --git a/src/applications/diffusion/controller/DiffusionDiffController.php b/src/applications/diffusion/controller/DiffusionDiffController.php index 60ff4a8c00..eeab7b61ac 100644 --- a/src/applications/diffusion/controller/DiffusionDiffController.php +++ b/src/applications/diffusion/controller/DiffusionDiffController.php @@ -94,7 +94,7 @@ final class DiffusionDiffController extends DiffusionController { } $phids = mpull($inlines, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $parser->setHandles($handles); } diff --git a/src/applications/diffusion/controller/DiffusionHistoryController.php b/src/applications/diffusion/controller/DiffusionHistoryController.php index bdc6d75c02..f3df297894 100644 --- a/src/applications/diffusion/controller/DiffusionHistoryController.php +++ b/src/applications/diffusion/controller/DiffusionHistoryController.php @@ -84,7 +84,7 @@ final class DiffusionHistoryController extends DiffusionController { $history_table->loadRevisions(); $phids = $history_table->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $history_table->setHandles($handles); if ($show_graph) { diff --git a/src/applications/diffusion/controller/DiffusionLastModifiedController.php b/src/applications/diffusion/controller/DiffusionLastModifiedController.php index bd475b9b2a..5d4d8d1b67 100644 --- a/src/applications/diffusion/controller/DiffusionLastModifiedController.php +++ b/src/applications/diffusion/controller/DiffusionLastModifiedController.php @@ -37,7 +37,7 @@ final class DiffusionLastModifiedController extends DiffusionController { } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $output = DiffusionBrowseTableView::renderLastModifiedColumns( $drequest->getRepository(), diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php index ee373c5ccc..4a4f2fa7f6 100644 --- a/src/applications/diffusion/controller/DiffusionRepositoryController.php +++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php @@ -64,7 +64,7 @@ final class DiffusionRepositoryController extends DiffusionController { } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $history_table = new DiffusionHistoryTableView(); $history_table->setDiffusionRequest($drequest); @@ -240,7 +240,7 @@ final class DiffusionRepositoryController extends DiffusionController { $view->setCommits($commits); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); diff --git a/src/applications/diffusion/controller/DiffusionTagListController.php b/src/applications/diffusion/controller/DiffusionTagListController.php index 80203e576e..1da231fecc 100644 --- a/src/applications/diffusion/controller/DiffusionTagListController.php +++ b/src/applications/diffusion/controller/DiffusionTagListController.php @@ -72,7 +72,7 @@ final class DiffusionTagListController extends DiffusionController { ->setDiffusionRequest($drequest); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = id(new AphrontPanelView()) diff --git a/src/applications/directory/controller/PhabricatorDirectoryMainController.php b/src/applications/directory/controller/PhabricatorDirectoryMainController.php index e9526f648e..a1407d160d 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryMainController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryMainController.php @@ -332,7 +332,7 @@ final class PhabricatorDirectoryMainController $phids = array_merge( array($user_phid), $revision_view->getRequiredHandlePHIDs()); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $revision_view->setHandles($handles); @@ -385,7 +385,7 @@ final class PhabricatorDirectoryMainController array_filter(mpull($tasks, 'getOwnerPHID')), array_mergev(mpull($tasks, 'getProjectPHIDs'))); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view = new ManiphestTaskListView(); $view->setTasks($tasks); @@ -623,7 +623,7 @@ final class PhabricatorDirectoryMainController $view->setUser($user); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); @@ -667,7 +667,7 @@ final class PhabricatorDirectoryMainController $view->setUser($user); $phids = $view->getRequiredHandlePHIDs(); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view->setHandles($handles); $panel = new AphrontPanelView(); diff --git a/src/applications/drydock/controller/DrydockLeaseListController.php b/src/applications/drydock/controller/DrydockLeaseListController.php index 107fa44096..7b25570b33 100644 --- a/src/applications/drydock/controller/DrydockLeaseListController.php +++ b/src/applications/drydock/controller/DrydockLeaseListController.php @@ -34,7 +34,7 @@ final class DrydockLeaseListController extends DrydockController { $data = $pager->sliceResults($data); $phids = mpull($data, 'getOwnerPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $resource_ids = mpull($data, 'getResourceID'); $resources = array(); diff --git a/src/applications/drydock/controller/DrydockResourceListController.php b/src/applications/drydock/controller/DrydockResourceListController.php index 1911dc120c..b00be65747 100644 --- a/src/applications/drydock/controller/DrydockResourceListController.php +++ b/src/applications/drydock/controller/DrydockResourceListController.php @@ -34,7 +34,7 @@ final class DrydockResourceListController extends DrydockController { $data = $pager->sliceResults($data); $phids = mpull($data, 'getOwnerPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($data as $resource) { diff --git a/src/applications/files/controller/PhabricatorFileListController.php b/src/applications/files/controller/PhabricatorFileListController.php index 16079eced6..d11c7062e3 100644 --- a/src/applications/files/controller/PhabricatorFileListController.php +++ b/src/applications/files/controller/PhabricatorFileListController.php @@ -209,7 +209,7 @@ final class PhabricatorFileListController extends PhabricatorFileController { $this->setListPager($pager); $phids = mpull($files, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $highlighted = $request->getStr('h'); $highlighted = explode('-', $highlighted); diff --git a/src/applications/files/controller/PhabricatorFileMacroListController.php b/src/applications/files/controller/PhabricatorFileMacroListController.php index 5a92bead91..f88ddab444 100644 --- a/src/applications/files/controller/PhabricatorFileMacroListController.php +++ b/src/applications/files/controller/PhabricatorFileMacroListController.php @@ -57,8 +57,7 @@ final class PhabricatorFileMacroListController "phid IN (%Ls)", $file_phids); $author_phids = mpull($files, 'getAuthorPHID', 'getPHID'); - $handles = id(new PhabricatorObjectHandleData($author_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($author_phids); } $files_map = mpull($files, null, 'getPHID'); diff --git a/src/applications/herald/controller/HeraldHomeController.php b/src/applications/herald/controller/HeraldHomeController.php index c8cf5c5f83..9b6e6e87b3 100644 --- a/src/applications/herald/controller/HeraldHomeController.php +++ b/src/applications/herald/controller/HeraldHomeController.php @@ -96,8 +96,7 @@ final class HeraldHomeController extends HeraldController { $rules = $query->executeWithOffsetPager($pager); $need_phids = mpull($rules, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($need_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($need_phids); $list_view = id(new HeraldRuleListView()) ->setRules($rules) diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php index 01a168f760..9e8ecea0f4 100644 --- a/src/applications/herald/controller/HeraldRuleController.php +++ b/src/applications/herald/controller/HeraldRuleController.php @@ -474,7 +474,7 @@ final class HeraldRuleController extends HeraldController { $phids[] = $rule->getAuthorPHID(); - return id(new PhabricatorObjectHandleData($phids))->loadHandles(); + return $this->loadViewerHandles($phids); } diff --git a/src/applications/herald/controller/HeraldRuleEditHistoryController.php b/src/applications/herald/controller/HeraldRuleEditHistoryController.php index 478abf905c..95fb72eafe 100644 --- a/src/applications/herald/controller/HeraldRuleEditHistoryController.php +++ b/src/applications/herald/controller/HeraldRuleEditHistoryController.php @@ -39,8 +39,7 @@ final class HeraldRuleEditHistoryController extends HeraldController { $edits = $edit_query->executeWithOffsetPager($pager); $need_phids = mpull($edits, 'getEditorPHID'); - $handles = id(new PhabricatorObjectHandleData($need_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($need_phids); $list_view = id(new HeraldRuleEditHistoryView()) ->setEdits($edits) diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php index b48f481e8c..0fd0131173 100644 --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -61,8 +61,7 @@ final class HeraldTranscriptController extends HeraldController { $phids = array_unique($phids); $phids = array_filter($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $this->handles = $handles; if ($xscript->getDryRun()) { @@ -473,8 +472,7 @@ final class HeraldTranscriptController extends HeraldController { $data = array(); if ($object_xscript) { $phid = $object_xscript->getPHID(); - $handles = id(new PhabricatorObjectHandleData(array($phid))) - ->loadHandles(); + $handles = $this->loadViewerHandles(array($phid)); $data += array( 'Object Name' => $object_xscript->getName(), diff --git a/src/applications/herald/controller/HeraldTranscriptListController.php b/src/applications/herald/controller/HeraldTranscriptListController.php index cee544d902..055f400d0a 100644 --- a/src/applications/herald/controller/HeraldTranscriptListController.php +++ b/src/applications/herald/controller/HeraldTranscriptListController.php @@ -63,8 +63,7 @@ final class HeraldTranscriptListController extends HeraldController { $handles = array(); if ($data) { $phids = ipull($data, 'objectPHID', 'objectPHID'); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); } $rows = array(); diff --git a/src/applications/maniphest/controller/ManiphestBatchEditController.php b/src/applications/maniphest/controller/ManiphestBatchEditController.php index ff64a0ae78..32b0fde384 100644 --- a/src/applications/maniphest/controller/ManiphestBatchEditController.php +++ b/src/applications/maniphest/controller/ManiphestBatchEditController.php @@ -55,8 +55,7 @@ final class ManiphestBatchEditController extends ManiphestController { $panel->setHeader('Maniphest Batch Editor'); $handle_phids = mpull($tasks, 'getOwnerPHID'); - $handles = id(new PhabricatorObjectHandleData($handle_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($handle_phids); $list = new ManiphestTaskListView(); $list->setTasks($tasks); diff --git a/src/applications/maniphest/controller/ManiphestExportController.php b/src/applications/maniphest/controller/ManiphestExportController.php index be017963ab..9de203df80 100644 --- a/src/applications/maniphest/controller/ManiphestExportController.php +++ b/src/applications/maniphest/controller/ManiphestExportController.php @@ -90,8 +90,7 @@ final class ManiphestExportController extends ManiphestController { $tasks = array_mergev($tasks); $all_projects = array_mergev(mpull($tasks, 'getProjectPHIDs')); - $project_handles = id(new PhabricatorObjectHandleData($all_projects)) - ->loadHandles(); + $project_handles = $this->loadViewerHandles($all_projects); $handles += $project_handles; $workbook = new PHPExcel(); diff --git a/src/applications/maniphest/controller/ManiphestReportController.php b/src/applications/maniphest/controller/ManiphestReportController.php index cfcb17d218..e3f61077cc 100644 --- a/src/applications/maniphest/controller/ManiphestReportController.php +++ b/src/applications/maniphest/controller/ManiphestReportController.php @@ -92,7 +92,7 @@ final class ManiphestReportController extends ManiphestController { $project_phid = $request->getStr('project'); if ($project_phid) { $phids = array($project_phid); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $handle = $handles[$project_phid]; } @@ -403,7 +403,7 @@ final class ManiphestReportController extends ManiphestController { $project_handle = null; if ($project_phid) { $phids = array($project_phid); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $project_handle = $handles[$project_phid]; $query->withProjects($phids); @@ -475,7 +475,7 @@ final class ManiphestReportController extends ManiphestController { } $phids = array_keys($result); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $handles = msort($handles, 'getName'); $order = $request->getStr('order', 'name'); diff --git a/src/applications/maniphest/controller/ManiphestTaskDescriptionChangeController.php b/src/applications/maniphest/controller/ManiphestTaskDescriptionChangeController.php index 0680ac20c6..eda546d22b 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDescriptionChangeController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDescriptionChangeController.php @@ -61,7 +61,7 @@ final class ManiphestTaskDescriptionChangeController $phids[$phid] = $phid; } } - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $engine = new PhabricatorMarkupEngine(); $engine->addObject($transaction, ManiphestTransaction::MARKUP_FIELD_BODY); diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 440af67794..cf1f15165a 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -105,8 +105,7 @@ final class ManiphestTaskDetailController extends ManiphestController { $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $dict = array(); $dict['Status'] = diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index c304785a57..631c0fc877 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -318,8 +318,7 @@ final class ManiphestTaskEditController extends ManiphestController { $phids = array_filter($phids); $phids = array_unique($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $tvalues = mpull($handles, 'getFullName', 'getPHID'); diff --git a/src/applications/maniphest/controller/ManiphestTransactionPreviewController.php b/src/applications/maniphest/controller/ManiphestTransactionPreviewController.php index 94e6c49b0d..82c41f6ea4 100644 --- a/src/applications/maniphest/controller/ManiphestTransactionPreviewController.php +++ b/src/applications/maniphest/controller/ManiphestTransactionPreviewController.php @@ -113,8 +113,7 @@ final class ManiphestTransactionPreviewController extends ManiphestController { } $phids[] = $user->getPHID(); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $transactions = array(); $transactions[] = $transaction; diff --git a/src/applications/metamta/controller/PhabricatorMetaMTAReceiveController.php b/src/applications/metamta/controller/PhabricatorMetaMTAReceiveController.php index 69a7f674a4..0a80ab4d88 100644 --- a/src/applications/metamta/controller/PhabricatorMetaMTAReceiveController.php +++ b/src/applications/metamta/controller/PhabricatorMetaMTAReceiveController.php @@ -49,8 +49,7 @@ final class PhabricatorMetaMTAReceiveController $received->processReceivedMail(); $phid = $receiver->getPHID(); - $handles = id(new PhabricatorObjectHandleData(array($phid))) - ->loadHandles(); + $handles = $this->loadViewerHandles(array($phid)); $uri = $handles[$phid]->getURI(); return id(new AphrontRedirectResponse())->setURI($uri); diff --git a/src/applications/metamta/controller/PhabricatorMetaMTAReceivedListController.php b/src/applications/metamta/controller/PhabricatorMetaMTAReceivedListController.php index 16d0cd73a6..b79d698def 100644 --- a/src/applications/metamta/controller/PhabricatorMetaMTAReceivedListController.php +++ b/src/applications/metamta/controller/PhabricatorMetaMTAReceivedListController.php @@ -40,7 +40,7 @@ final class PhabricatorMetaMTAReceivedListController ); $phids = array_unique(array_filter($phids)); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($mails as $mail) { diff --git a/src/applications/owners/controller/PhabricatorOwnersDetailController.php b/src/applications/owners/controller/PhabricatorOwnersDetailController.php index bc511a3b65..ea5ca844f9 100644 --- a/src/applications/owners/controller/PhabricatorOwnersDetailController.php +++ b/src/applications/owners/controller/PhabricatorOwnersDetailController.php @@ -59,9 +59,7 @@ final class PhabricatorOwnersDetailController } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->setViewer($this->getRequest()->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); @@ -216,9 +214,7 @@ final class PhabricatorOwnersDetailController $phids[] = $commit_view['view']->getRequiredHandlePHIDs(); } $phids = array_mergev($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->setViewer($user) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $commit_panels = array(); foreach ($commit_views as $commit_view) { diff --git a/src/applications/owners/controller/PhabricatorOwnersEditController.php b/src/applications/owners/controller/PhabricatorOwnersEditController.php index 0a2c2d40bd..f11b1b20d8 100644 --- a/src/applications/owners/controller/PhabricatorOwnersEditController.php +++ b/src/applications/owners/controller/PhabricatorOwnersEditController.php @@ -129,8 +129,7 @@ final class PhabricatorOwnersEditController $error_view->setErrors($errors); } - $handles = id(new PhabricatorObjectHandleData($owners)) - ->loadHandles(); + $handles = $this->loadViewerHandles($owners); $primary = $package->getPrimaryOwnerPHID(); if ($primary && isset($handles[$primary])) { diff --git a/src/applications/owners/controller/PhabricatorOwnersListController.php b/src/applications/owners/controller/PhabricatorOwnersListController.php index f53749a666..e4afc5061d 100644 --- a/src/applications/owners/controller/PhabricatorOwnersListController.php +++ b/src/applications/owners/controller/PhabricatorOwnersListController.php @@ -145,8 +145,7 @@ final class PhabricatorOwnersListController if ($request->getArr('owner')) { $phids = $request->getArr('owner'); $phid = reset($phids); - $handles = id(new PhabricatorObjectHandleData(array($phid))) - ->loadHandles(); + $handles = $this->loadViewerHandles(array($phid)); $owners_search_value = array( $phid => $handles[$phid]->getFullName(), ); @@ -222,9 +221,7 @@ final class PhabricatorOwnersListController $phids[$owner->getUserPHID()] = true; } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->setViewer($this->getRequest()->getUser()) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $repository_phids = array(); foreach ($paths as $path) { diff --git a/src/applications/people/controller/PhabricatorPeopleLogsController.php b/src/applications/people/controller/PhabricatorPeopleLogsController.php index 64430ad1fc..9d0839d5b6 100644 --- a/src/applications/people/controller/PhabricatorPeopleLogsController.php +++ b/src/applications/people/controller/PhabricatorPeopleLogsController.php @@ -39,7 +39,7 @@ final class PhabricatorPeopleLogsController $phids = array_merge($filter_user, $filter_actor); if ($phids) { - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); if ($filter_user) { $filter_user = reset($filter_user); $user_value = array( @@ -165,7 +165,7 @@ final class PhabricatorPeopleLogsController $phids[$log->getUserPHID()] = true; } $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($logs as $log) { diff --git a/src/applications/phame/controller/blog/PhameBlogViewController.php b/src/applications/phame/controller/blog/PhameBlogViewController.php index 96af259859..3bb2d94b3a 100644 --- a/src/applications/phame/controller/blog/PhameBlogViewController.php +++ b/src/applications/phame/controller/blog/PhameBlogViewController.php @@ -84,8 +84,7 @@ final class PhameBlogViewController $blogger_phids = $this->getBloggerPHIDs(); if ($blogger_phids) { - $bloggers = id(new PhabricatorObjectHandleData($blogger_phids)) - ->loadHandles(); + $bloggers = $this->loadViewerHandles($blogger_phids); } else { $bloggers = array(); } diff --git a/src/applications/phame/controller/post/list/PhamePostListBaseController.php b/src/applications/phame/controller/post/list/PhamePostListBaseController.php index 97f9ef4ffc..1c3e12c3de 100644 --- a/src/applications/phame/controller/post/list/PhamePostListBaseController.php +++ b/src/applications/phame/controller/post/list/PhamePostListBaseController.php @@ -67,7 +67,7 @@ abstract class PhamePostListBaseController $blogger_phids = mpull($posts, 'getBloggerPHID', 'getBloggerPHID'); return - id(new PhabricatorObjectHandleData($blogger_phids))->loadHandles(); + $this->loadViewerHandles($blogger_phids); } protected function buildPostListPageResponse() { diff --git a/src/applications/phid/controller/PhabricatorPHIDLookupController.php b/src/applications/phid/controller/PhabricatorPHIDLookupController.php index f835308395..524bccc80e 100644 --- a/src/applications/phid/controller/PhabricatorPHIDLookupController.php +++ b/src/applications/phid/controller/PhabricatorPHIDLookupController.php @@ -24,8 +24,7 @@ final class PhabricatorPHIDLookupController $request = $this->getRequest(); $phids = $request->getStrList('phids'); if ($phids) { - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($handles as $handle) { diff --git a/src/applications/phriction/controller/PhrictionDiffController.php b/src/applications/phriction/controller/PhrictionDiffController.php index c5af468c5a..b9b3a2dfba 100644 --- a/src/applications/phriction/controller/PhrictionDiffController.php +++ b/src/applications/phriction/controller/PhrictionDiffController.php @@ -238,7 +238,7 @@ final class PhrictionDiffController $user = $this->getRequest()->getUser(); $phids = mpull($content, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($content as $c) { diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index 60676bfe1e..5f3253d44e 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -125,7 +125,7 @@ final class PhrictionDocumentController $content->getAuthorPHID(), $project_phid, )); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $age = time() - $content->getDateCreated(); $age = floor($age / (60 * 60 * 24)); @@ -234,8 +234,7 @@ final class PhrictionDocumentController $ancestor_phids = mpull($ancestors, 'getPHID'); $handles = array(); if ($ancestor_phids) { - $handles = id(new PhabricatorObjectHandleData($ancestor_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($ancestor_phids); } $ancestor_handles = array(); diff --git a/src/applications/phriction/controller/PhrictionHistoryController.php b/src/applications/phriction/controller/PhrictionHistoryController.php index e266a6d7a0..18be906fb0 100644 --- a/src/applications/phriction/controller/PhrictionHistoryController.php +++ b/src/applications/phriction/controller/PhrictionHistoryController.php @@ -55,8 +55,7 @@ final class PhrictionHistoryController $history = $pager->sliceResults($history); $author_phids = mpull($history, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($author_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($author_phids); $rows = array(); foreach ($history as $content) { diff --git a/src/applications/phriction/controller/PhrictionListController.php b/src/applications/phriction/controller/PhrictionListController.php index a6fd949c64..4306474e3f 100644 --- a/src/applications/phriction/controller/PhrictionListController.php +++ b/src/applications/phriction/controller/PhrictionListController.php @@ -65,7 +65,7 @@ final class PhrictionListController $content = mpull($documents, 'getContent'); $phids = mpull($content, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); diff --git a/src/applications/ponder/controller/PonderAnswerPreviewController.php b/src/applications/ponder/controller/PonderAnswerPreviewController.php index 9eaa15797a..9b4d3b7d92 100644 --- a/src/applications/ponder/controller/PonderAnswerPreviewController.php +++ b/src/applications/ponder/controller/PonderAnswerPreviewController.php @@ -32,8 +32,7 @@ final class PonderAnswerPreviewController $author_phid = $user->getPHID(); $object_phids = array($author_phid); - $handles = id(new PhabricatorObjectHandleData($object_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($object_phids); $answer = new PonderAnswer(); $answer->setContent($request->getStr('content')); diff --git a/src/applications/ponder/controller/PonderFeedController.php b/src/applications/ponder/controller/PonderFeedController.php index 645f248ba0..c9a1ae48e3 100644 --- a/src/applications/ponder/controller/PonderFeedController.php +++ b/src/applications/ponder/controller/PonderFeedController.php @@ -86,8 +86,7 @@ final class PonderFeedController extends PonderController { foreach ($data as $question) { $phids[] = $question->getAuthorPHID(); } - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $side_nav->appendChild( id(new PonderQuestionFeedView()) @@ -115,8 +114,7 @@ final class PonderFeedController extends PonderController { ); $phids = array($user->getPHID()); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $side_nav->appendChild( id(new PonderUserProfileView()) diff --git a/src/applications/ponder/controller/PonderQuestionPreviewController.php b/src/applications/ponder/controller/PonderQuestionPreviewController.php index 1dff4a58a5..4725dabec3 100644 --- a/src/applications/ponder/controller/PonderQuestionPreviewController.php +++ b/src/applications/ponder/controller/PonderQuestionPreviewController.php @@ -29,8 +29,7 @@ final class PonderQuestionPreviewController $author_phid = $user->getPHID(); $object_phids = array($author_phid); - $handles = id(new PhabricatorObjectHandleData($object_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($object_phids); $question = new PonderQuestion(); $question->setContent($request->getStr('content')); diff --git a/src/applications/ponder/controller/PonderQuestionViewController.php b/src/applications/ponder/controller/PonderQuestionViewController.php index c3356a2ee6..5e3ef265a3 100644 --- a/src/applications/ponder/controller/PonderQuestionViewController.php +++ b/src/applications/ponder/controller/PonderQuestionViewController.php @@ -41,8 +41,7 @@ final class PonderQuestionViewController extends PonderController { $object_phids[] = $answer->getAuthorPHID(); } - $handles = id(new PhabricatorObjectHandleData($object_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($object_phids); $detail_panel = new PonderQuestionDetailView(); $detail_panel diff --git a/src/applications/project/controller/PhabricatorProjectMembersEditController.php b/src/applications/project/controller/PhabricatorProjectMembersEditController.php index 5e3aad4861..a6b8125a9b 100644 --- a/src/applications/project/controller/PhabricatorProjectMembersEditController.php +++ b/src/applications/project/controller/PhabricatorProjectMembersEditController.php @@ -87,8 +87,7 @@ final class PhabricatorProjectMembersEditController } $member_phids = array_reverse($member_phids); - $handles = id(new PhabricatorObjectHandleData($member_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($member_phids); $state = array(); foreach ($handles as $handle) { diff --git a/src/applications/project/controller/PhabricatorProjectProfileController.php b/src/applications/project/controller/PhabricatorProjectProfileController.php index 241cb69518..637eaeb04b 100644 --- a/src/applications/project/controller/PhabricatorProjectProfileController.php +++ b/src/applications/project/controller/PhabricatorProjectProfileController.php @@ -149,8 +149,7 @@ final class PhabricatorProjectProfileController $phids = array($project->getAuthorPHID()); $phids = array_unique($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $timestamp = phabricator_datetime($project->getDateCreated(), $viewer); @@ -187,8 +186,7 @@ final class PhabricatorProjectProfileController PhabricatorProjectProfile $profile) { $member_phids = $project->getMemberPHIDs(); - $handles = id(new PhabricatorObjectHandleData($member_phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($member_phids); $affiliated = array(); foreach ($handles as $phids => $handle) { @@ -259,8 +257,7 @@ final class PhabricatorProjectProfileController $phids = mpull($tasks, 'getOwnerPHID'); $phids = array_filter($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $task_views = array(); foreach ($tasks as $task) { diff --git a/src/applications/search/controller/PhabricatorSearchAttachController.php b/src/applications/search/controller/PhabricatorSearchAttachController.php index 58a98e3549..1237c0d898 100644 --- a/src/applications/search/controller/PhabricatorSearchAttachController.php +++ b/src/applications/search/controller/PhabricatorSearchAttachController.php @@ -109,8 +109,7 @@ final class PhabricatorSearchAttachController $strings = $this->getStrings(); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $obj_dialog = new PhabricatorObjectSelectorDialog(); $obj_dialog @@ -279,8 +278,7 @@ final class PhabricatorSearchAttachController private function raiseGraphCycleException(PhabricatorEdgeCycleException $ex) { $cycle = $ex->getCycle(); - $handles = id(new PhabricatorObjectHandleData($cycle)) - ->loadHandles(); + $handles = $this->loadViewerHandles($cycle); $names = array(); foreach ($cycle as $cycle_phid) { $names[] = $handles[$cycle_phid]->getFullName(); diff --git a/src/applications/search/controller/PhabricatorSearchController.php b/src/applications/search/controller/PhabricatorSearchController.php index 76b8b7d9a7..33870617af 100644 --- a/src/applications/search/controller/PhabricatorSearchController.php +++ b/src/applications/search/controller/PhabricatorSearchController.php @@ -128,8 +128,7 @@ final class PhabricatorSearchController $query->getParameter('project', array()) ); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $author_value = array_select_keys( $handles, diff --git a/src/applications/search/controller/PhabricatorSearchIndexController.php b/src/applications/search/controller/PhabricatorSearchIndexController.php index cb712c7097..509ba6600f 100644 --- a/src/applications/search/controller/PhabricatorSearchIndexController.php +++ b/src/applications/search/controller/PhabricatorSearchIndexController.php @@ -103,7 +103,7 @@ final class PhabricatorSearchIndexController $relationships = $document->getRelationshipData(); $phids = ipull($relationships, 1); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($relationships as $relationship) { diff --git a/src/applications/search/controller/PhabricatorSearchSelectController.php b/src/applications/search/controller/PhabricatorSearchSelectController.php index e6700af0c4..64a70e2895 100644 --- a/src/applications/search/controller/PhabricatorSearchSelectController.php +++ b/src/applications/search/controller/PhabricatorSearchSelectController.php @@ -64,8 +64,7 @@ final class PhabricatorSearchSelectController $phids += $this->queryObjectNames($query_str); $phids = array_keys($phids); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $data = array(); foreach ($handles as $handle) { diff --git a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php index 5076778e5d..ea1d10080d 100644 --- a/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php +++ b/src/applications/slowvote/controller/PhabricatorSlowvoteListController.php @@ -56,7 +56,7 @@ final class PhabricatorSlowvoteListController $polls = $this->loadPolls($pager, $view); $phids = mpull($polls, 'getAuthorPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); $rows = array(); foreach ($polls as $poll) { diff --git a/src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php b/src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php index bfcae45282..d5cc9238d5 100644 --- a/src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php +++ b/src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php @@ -170,7 +170,7 @@ final class PhabricatorTypeaheadCommonDatasourceController if ($need_rich_data) { $phids = mpull($users, 'getPHID'); - $handles = id(new PhabricatorObjectHandleData($phids))->loadHandles(); + $handles = $this->loadViewerHandles($phids); } foreach ($users as $user) { diff --git a/src/infrastructure/diff/PhabricatorInlineCommentController.php b/src/infrastructure/diff/PhabricatorInlineCommentController.php index dc7792912f..e5eab9d704 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentController.php @@ -226,8 +226,7 @@ abstract class PhabricatorInlineCommentController $phids = array($user->getPHID()); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $view = new DifferentialInlineCommentView(); $view->setInlineComment($inline); diff --git a/src/infrastructure/diff/PhabricatorInlineCommentPreviewController.php b/src/infrastructure/diff/PhabricatorInlineCommentPreviewController.php index cbbfeafe83..94645b6a73 100644 --- a/src/infrastructure/diff/PhabricatorInlineCommentPreviewController.php +++ b/src/infrastructure/diff/PhabricatorInlineCommentPreviewController.php @@ -30,8 +30,7 @@ abstract class PhabricatorInlineCommentPreviewController $engine = PhabricatorMarkupEngine::newDifferentialMarkupEngine(); $phids = array($user->getPHID()); - $handles = id(new PhabricatorObjectHandleData($phids)) - ->loadHandles(); + $handles = $this->loadViewerHandles($phids); $views = array(); foreach ($inlines as $inline) {