From 43b94a6f9515f70518a48442a09cbdffb38baddc Mon Sep 17 00:00:00 2001 From: vrana Date: Thu, 19 Jul 2012 10:15:06 -0700 Subject: [PATCH] Redirect after post when changing Diffusion view Summary: I spend most time in software development by being lazy. Test Plan: Changed view, reloaded page, viewed the file without sending the form. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3012 --- .../diffusion/controller/DiffusionBrowseFileController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/applications/diffusion/controller/DiffusionBrowseFileController.php b/src/applications/diffusion/controller/DiffusionBrowseFileController.php index ed31b2191d..a6d4582234 100644 --- a/src/applications/diffusion/controller/DiffusionBrowseFileController.php +++ b/src/applications/diffusion/controller/DiffusionBrowseFileController.php @@ -43,6 +43,9 @@ final class DiffusionBrowseFileController extends DiffusionController { PhabricatorUserPreferences::PREFERENCE_DIFFUSION_VIEW, $selected); $preferences->save(); + + return id(new AphrontRedirectResponse()) + ->setURI($request->getRequestURI()->alter('view', $selected)); } $needs_blame = ($selected == 'blame' || $selected == 'plainblame');