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:
parent
306af6fb28
commit
f18537ce0b
1 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,7 @@ final class PonderQuestionSearchEngine
|
||||||
|
|
||||||
protected function getBuiltinQueryNames() {
|
protected function getBuiltinQueryNames() {
|
||||||
$names = array(
|
$names = array(
|
||||||
|
'recent' => pht('Recent Questions'),
|
||||||
'open' => pht('Open Questions'),
|
'open' => pht('Open Questions'),
|
||||||
'resolved' => pht('Resolved Questions'),
|
'resolved' => pht('Resolved Questions'),
|
||||||
'all' => pht('All Questions'),
|
'all' => pht('All Questions'),
|
||||||
|
@ -80,6 +81,12 @@ final class PonderQuestionSearchEngine
|
||||||
case 'open':
|
case 'open':
|
||||||
return $query->setParameter(
|
return $query->setParameter(
|
||||||
'statuses', array(PonderQuestionStatus::STATUS_OPEN));
|
'statuses', array(PonderQuestionStatus::STATUS_OPEN));
|
||||||
|
case 'recent':
|
||||||
|
return $query->setParameter(
|
||||||
|
'statuses', array(
|
||||||
|
PonderQuestionStatus::STATUS_OPEN,
|
||||||
|
PonderQuestionStatus::STATUS_CLOSED_RESOLVED,
|
||||||
|
));
|
||||||
case 'resolved':
|
case 'resolved':
|
||||||
return $query->setParameter(
|
return $query->setParameter(
|
||||||
'statuses', array(PonderQuestionStatus::STATUS_CLOSED_RESOLVED));
|
'statuses', array(PonderQuestionStatus::STATUS_CLOSED_RESOLVED));
|
||||||
|
|
Loading…
Reference in a new issue