1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

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
This commit is contained in:
vrana 2012-07-19 10:15:06 -07:00
parent e746ccfeeb
commit 43b94a6f95

View file

@ -43,6 +43,9 @@ final class DiffusionBrowseFileController extends DiffusionController {
PhabricatorUserPreferences::PREFERENCE_DIFFUSION_VIEW, PhabricatorUserPreferences::PREFERENCE_DIFFUSION_VIEW,
$selected); $selected);
$preferences->save(); $preferences->save();
return id(new AphrontRedirectResponse())
->setURI($request->getRequestURI()->alter('view', $selected));
} }
$needs_blame = ($selected == 'blame' || $selected == 'plainblame'); $needs_blame = ($selected == 'blame' || $selected == 'plainblame');