Fix default order for Differential queries
Summary: Fixes T3781. The UI defaults to "Created" but the query defaults to "Modified". Make the two consistent. In particular, an issue this fixes is that previously a `/differential/?authors=duck` page would show "Order: Created" but actually order by "Modified". Test Plan: Visited `/differential/?authors=duck` and verified the revisions were ordered by creation date. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3781 Differential Revision: https://secure.phabricator.com/D6843
This commit is contained in:
@@ -82,6 +82,8 @@ final class DifferentialRevisionSearchEngine
|
||||
$order = $saved->getParameter('order');
|
||||
if (idx($this->getOrderOptions(), $order)) {
|
||||
$query->setOrder($order);
|
||||
} else {
|
||||
$query->setOrder(DifferentialRevisionQuery::ORDER_CREATED);
|
||||
}
|
||||
|
||||
return $query;
|
||||
|
||||
Reference in New Issue
Block a user