Skip to content

Commit 2868a69

Browse files
author
epriestley
committed
Remove all setObjectURI() from ActionListViews
Summary: Ref T10004. After D14804, we get this behavior by default and no longer need to set it explicitly. (If some endpoint did eventually need to set it explicitly, it could just change what it passes to `setHref()`, but I believe we currently have no such endpoints and do not foresee ever having any.) Test Plan: - As a logged out user, clicked various links in Differential, Maniphest, Files, etc., always got redirected to a sensible place after login. - Grepped for `setObjectURI()`, `getObjectURI()` (there are a few remaining callsites, but to a different method with the same name in Doorkeeper). Reviewers: chad Reviewed By: chad Subscribers: hach-que Maniphest Tasks: T10004 Differential Revision: https://secure.phabricator.com/D14805
1 parent e869e7d commit 2868a69

File tree

49 files changed

+22
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+22
-111
lines changed

src/applications/calendar/controller/PhabricatorCalendarEventViewController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ private function buildActionView(PhabricatorCalendarEvent $event) {
152152
$is_attending = $event->getIsUserAttending($viewer->getPHID());
153153

154154
$actions = id(new PhabricatorActionListView())
155-
->setObjectURI($this->getApplicationURI('event/'.$id.'/'))
156155
->setUser($viewer)
157156
->setObject($event);
158157

src/applications/dashboard/controller/PhabricatorDashboardManageController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ private function buildActionView(PhabricatorDashboard $dashboard) {
9999
$id = $dashboard->getID();
100100

101101
$actions = id(new PhabricatorActionListView())
102-
->setObjectURI($this->getApplicationURI('view/'.$dashboard->getID().'/'))
103102
->setObject($dashboard)
104103
->setUser($viewer);
105104

src/applications/dashboard/controller/PhabricatorDashboardPanelViewController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ private function buildActionView(PhabricatorDashboardPanel $panel) {
8484
$id = $panel->getID();
8585

8686
$actions = id(new PhabricatorActionListView())
87-
->setObjectURI('/'.$panel->getMonogram())
8887
->setObject($panel)
8988
->setUser($viewer);
9089

src/applications/differential/view/DifferentialRevisionDetailView.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ public function render() {
6363

6464
$actions = id(new PhabricatorActionListView())
6565
->setUser($user)
66-
->setObject($revision)
67-
->setObjectURI($this->getURI());
66+
->setObject($revision);
6867
foreach ($this->getActions() as $action) {
6968
$actions->addAction($action);
7069
}

src/applications/diffusion/controller/DiffusionCommitController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,8 +903,7 @@ private function renderHeadsupActionList(
903903

904904
$actions = id(new PhabricatorActionListView())
905905
->setUser($user)
906-
->setObject($commit)
907-
->setObjectURI($request->getRequestURI());
906+
->setObject($commit);
908907

909908
$can_edit = PhabricatorPolicyFilter::hasCapability(
910909
$user,

src/applications/diffusion/controller/DiffusionRepositoryController.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,11 @@ private function buildTagListTable(DiffusionRequest $drequest) {
480480
private function buildActionList(PhabricatorRepository $repository) {
481481
$viewer = $this->getRequest()->getUser();
482482

483-
$view_uri = $this->getApplicationURI($repository->getCallsign().'/');
484483
$edit_uri = $this->getApplicationURI($repository->getCallsign().'/edit/');
485484

486485
$view = id(new PhabricatorActionListView())
487486
->setUser($viewer)
488-
->setObject($repository)
489-
->setObjectURI($view_uri);
487+
->setObject($repository);
490488

491489
$can_edit = PhabricatorPolicyFilter::hasCapability(
492490
$viewer,

src/applications/diffusion/controller/DiffusionRepositoryEditMainController.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ private function buildBasicActions(PhabricatorRepository $repository) {
224224
$viewer = $this->getRequest()->getUser();
225225

226226
$view = id(new PhabricatorActionListView())
227-
->setObjectURI($this->getRequest()->getRequestURI())
228227
->setUser($viewer);
229228

230229
$edit = id(new PhabricatorActionView())
@@ -327,7 +326,6 @@ private function buildEncodingActions(PhabricatorRepository $repository) {
327326
$viewer = $this->getRequest()->getUser();
328327

329328
$view = id(new PhabricatorActionListView())
330-
->setObjectURI($this->getRequest()->getRequestURI())
331329
->setUser($viewer);
332330

333331
$edit = id(new PhabricatorActionView())
@@ -364,7 +362,6 @@ private function buildPolicyActions(PhabricatorRepository $repository) {
364362
$viewer = $this->getRequest()->getUser();
365363

366364
$view = id(new PhabricatorActionListView())
367-
->setObjectURI($this->getRequest()->getRequestURI())
368365
->setUser($viewer);
369366

370367
$edit = id(new PhabricatorActionView())
@@ -419,7 +416,6 @@ private function buildBranchesActions(PhabricatorRepository $repository) {
419416
$viewer = $this->getRequest()->getUser();
420417

421418
$view = id(new PhabricatorActionListView())
422-
->setObjectURI($this->getRequest()->getRequestURI())
423419
->setUser($viewer);
424420

425421
$edit = id(new PhabricatorActionView())
@@ -469,7 +465,6 @@ private function buildSubversionActions(PhabricatorRepository $repository) {
469465
$viewer = $this->getRequest()->getUser();
470466

471467
$view = id(new PhabricatorActionListView())
472-
->setObjectURI($this->getRequest()->getRequestURI())
473468
->setUser($viewer);
474469

475470
$edit = id(new PhabricatorActionView())
@@ -509,7 +504,6 @@ private function buildActionsActions(PhabricatorRepository $repository) {
509504
$viewer = $this->getRequest()->getUser();
510505

511506
$view = id(new PhabricatorActionListView())
512-
->setObjectURI($this->getRequest()->getRequestURI())
513507
->setUser($viewer);
514508

515509
$edit = id(new PhabricatorActionView())
@@ -551,7 +545,6 @@ private function buildRemoteActions(PhabricatorRepository $repository) {
551545
$viewer = $this->getRequest()->getUser();
552546

553547
$view = id(new PhabricatorActionListView())
554-
->setObjectURI($this->getRequest()->getRequestURI())
555548
->setUser($viewer);
556549

557550
$edit = id(new PhabricatorActionView())
@@ -592,7 +585,6 @@ private function buildStorageActions(PhabricatorRepository $repository) {
592585
$viewer = $this->getRequest()->getUser();
593586

594587
$view = id(new PhabricatorActionListView())
595-
->setObjectURI($this->getRequest()->getRequestURI())
596588
->setUser($viewer);
597589

598590
$edit = id(new PhabricatorActionView())
@@ -640,7 +632,6 @@ private function buildStagingActions(PhabricatorRepository $repository) {
640632
$viewer = $this->getViewer();
641633

642634
$view = id(new PhabricatorActionListView())
643-
->setObjectURI($this->getRequest()->getRequestURI())
644635
->setUser($viewer);
645636

646637
$edit = id(new PhabricatorActionView())
@@ -678,7 +669,6 @@ private function buildAutomationActions(PhabricatorRepository $repository) {
678669
$viewer = $this->getViewer();
679670

680671
$view = id(new PhabricatorActionListView())
681-
->setObjectURI($this->getRequest()->getRequestURI())
682672
->setUser($viewer);
683673

684674
$edit = id(new PhabricatorActionView())
@@ -732,7 +722,6 @@ private function buildHostingActions(PhabricatorRepository $repository) {
732722
$user = $this->getRequest()->getUser();
733723

734724
$view = id(new PhabricatorActionListView())
735-
->setObjectURI($this->getRequest()->getRequestURI())
736725
->setUser($user);
737726

738727
$edit = id(new PhabricatorActionView())
@@ -1240,7 +1229,6 @@ private function buildMirrorActions(
12401229
$viewer = $this->getRequest()->getUser();
12411230

12421231
$mirror_actions = id(new PhabricatorActionListView())
1243-
->setObjectURI($this->getRequest()->getRequestURI())
12441232
->setUser($viewer);
12451233

12461234
$new_mirror_uri = $this->getRepositoryControllerURI(
@@ -1319,7 +1307,6 @@ private function buildSymbolsActions(PhabricatorRepository $repository) {
13191307
$viewer = $this->getRequest()->getUser();
13201308

13211309
$view = id(new PhabricatorActionListView())
1322-
->setObjectURI($this->getRequest()->getRequestURI())
13231310
->setUser($viewer);
13241311

13251312
$edit = id(new PhabricatorActionView())

src/applications/diviner/controller/DivinerBookController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ private function buildActionView(
125125

126126
$action_view = id(new PhabricatorActionListView())
127127
->setUser($user)
128-
->setObject($book)
129-
->setObjectURI($this->getRequest()->getRequestURI());
128+
->setObject($book);
130129

131130
$action_view->addAction(
132131
id(new PhabricatorActionView())

src/applications/drydock/controller/DrydockAuthorizationViewController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ private function buildActionListView(DrydockAuthorization $authorization) {
6767

6868
$view = id(new PhabricatorActionListView())
6969
->setUser($viewer)
70-
->setObjectURI($this->getRequest()->getRequestURI())
7170
->setObject($authorization);
7271

7372
$can_edit = PhabricatorPolicyFilter::hasCapability(

src/applications/drydock/controller/DrydockBlueprintViewController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ private function buildActionListView(DrydockBlueprint $blueprint) {
8686

8787
$view = id(new PhabricatorActionListView())
8888
->setUser($viewer)
89-
->setObjectURI($this->getRequest()->getRequestURI())
9089
->setObject($blueprint);
9190

9291
$edit_uri = $this->getApplicationURI("blueprint/edit/{$id}/");

0 commit comments

Comments
 (0)