1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Change Ponder default query to 'Recent'

Summary: In Ponder, I think the right default query is "good" questions. That being recently asked, and either open or resolved. For browsing this seems correct. For moderators, I presume they use saved queries accordingly. This is similar to stack overflow and quora.

Test Plan: Review queries in my dev box, all seems to run correctly

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D13877
This commit is contained in:
Chad Little 2015-08-12 07:56:10 -07:00
parent 306af6fb28
commit f18537ce0b

View file

@ -57,6 +57,7 @@ final class PonderQuestionSearchEngine
protected function getBuiltinQueryNames() {
$names = array(
'recent' => pht('Recent Questions'),
'open' => pht('Open Questions'),
'resolved' => pht('Resolved Questions'),
'all' => pht('All Questions'),
@ -80,6 +81,12 @@ final class PonderQuestionSearchEngine
case 'open':
return $query->setParameter(
'statuses', array(PonderQuestionStatus::STATUS_OPEN));
case 'recent':
return $query->setParameter(
'statuses', array(
PonderQuestionStatus::STATUS_OPEN,
PonderQuestionStatus::STATUS_CLOSED_RESOLVED,
));
case 'resolved':
return $query->setParameter(
'statuses', array(PonderQuestionStatus::STATUS_CLOSED_RESOLVED));