1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00

Respect Status and Order in Filter Revisions

Summary:
Filter Revisions button currently resets Status and Order fields.
I've rewritten it to GET form because it doesn't perform any action.
It fixed the problem along the way.

Test Plan:
/differential/filter/revisions/
Status: Open.
Filter Revisions.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1771
This commit is contained in:
vrana 2012-03-04 01:44:36 -08:00
parent 8f2c426ff2
commit aa00e2b2e4

View file

@ -33,11 +33,13 @@ class DifferentialRevisionListController extends DifferentialController {
$user = $request->getUser();
$viewer_is_anonymous = !$user->isLoggedIn();
if ($request->isFormPost()) {
$phid_arr = $request->getArr('view_user');
$phid_arr = $request->getArr('view_user');
if ($phid_arr) {
$view_target = head($phid_arr);
return id(new AphrontRedirectResponse())
->setURI($request->getRequestURI()->alter('phid', $view_target));
->setURI($request->getRequestURI()
->alter('phid', $view_target)
->setQueryParam('view_user', null));
}
$params = array_filter(
@ -149,6 +151,7 @@ class DifferentialRevisionListController extends DifferentialController {
}
$filter_form = id(new AphrontFormView())
->setMethod('GET')
->setAction('/differential/filter/'.$this->filter.'/')
->setUser($user);
foreach ($controls as $control) {