From 789d57522b039b1ca755af7e5dc4e591d92e7277 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 19 May 2017 13:52:26 -0700 Subject: [PATCH] Make editing project images redirect to "Manage" more consistently Summary: Ref T12732. Currently, different ways of setting a profile image can leave you in different places. Instead, always send the user back to the "Manage" page. Test Plan: Used "Current Picture", "use picture", "Build picture" and "upload picture", always ended up in the same spot. Reviewers: chad, amckinley Reviewed By: amckinley Maniphest Tasks: T12732 Differential Revision: https://secure.phabricator.com/D17967 --- .../controller/PhabricatorProjectEditPictureController.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectEditPictureController.php b/src/applications/project/controller/PhabricatorProjectEditPictureController.php index 9d0c16efb9..95d3bbd855 100644 --- a/src/applications/project/controller/PhabricatorProjectEditPictureController.php +++ b/src/applications/project/controller/PhabricatorProjectEditPictureController.php @@ -23,8 +23,7 @@ final class PhabricatorProjectEditPictureController $this->setProject($project); - $edit_uri = $this->getApplicationURI('profile/'.$project->getID().'/'); - $view_uri = $this->getApplicationURI('profile/'.$project->getID().'/'); + $manage_uri = $this->getApplicationURI('manage/'.$project->getID().'/'); $supported_formats = PhabricatorFile::getTransformableImageFormats(); $e_file = true; @@ -90,7 +89,7 @@ final class PhabricatorProjectEditPictureController $editor->applyTransactions($project, $xactions); - return id(new AphrontRedirectResponse())->setURI($edit_uri); + return id(new AphrontRedirectResponse())->setURI($manage_uri); } } @@ -243,7 +242,7 @@ final class PhabricatorProjectEditPictureController pht('Supported formats: %s', implode(', ', $supported_formats)))) ->appendChild( id(new AphrontFormSubmitControl()) - ->addCancelButton($edit_uri) + ->addCancelButton($manage_uri) ->setValue(pht('Upload Picture'))); $form_box = id(new PHUIObjectBoxView())