Differential D20730 Diff 49426 src/applications/differential/query/DifferentialRevisionSearchEngine.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/query/DifferentialRevisionSearchEngine.php
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | protected function buildQueryFromParameters(array $map) { | ||||
| } | } | ||||
| if ($map['createdStart'] || $map['createdEnd']) { | if ($map['createdStart'] || $map['createdEnd']) { | ||||
| $query->withCreatedEpochBetween( | $query->withCreatedEpochBetween( | ||||
| $map['createdStart'], | $map['createdStart'], | ||||
| $map['createdEnd']); | $map['createdEnd']); | ||||
| } | } | ||||
| if ($map['modifiedStart'] || $map['modifiedEnd']) { | |||||
| $query->withUpdatedEpochBetween( | |||||
| $map['modifiedStart'], | |||||
| $map['modifiedEnd']); | |||||
| } | |||||
| return $query; | return $query; | ||||
| } | } | ||||
| protected function buildCustomSearchFields() { | protected function buildCustomSearchFields() { | ||||
| return array( | return array( | ||||
| id(new PhabricatorSearchDatasourceField()) | id(new PhabricatorSearchDatasourceField()) | ||||
| ->setLabel(pht('Responsible Users')) | ->setLabel(pht('Responsible Users')) | ||||
| ->setKey('responsiblePHIDs') | ->setKey('responsiblePHIDs') | ||||
| Show All 33 Lines | return array( | ||||
| ->setKey('createdStart') | ->setKey('createdStart') | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Find revisions created at or after a particular time.')), | pht('Find revisions created at or after a particular time.')), | ||||
| id(new PhabricatorSearchDateField()) | id(new PhabricatorSearchDateField()) | ||||
| ->setLabel(pht('Created Before')) | ->setLabel(pht('Created Before')) | ||||
| ->setKey('createdEnd') | ->setKey('createdEnd') | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Find revisions created at or before a particular time.')), | pht('Find revisions created at or before a particular time.')), | ||||
| id(new PhabricatorSearchDateField()) | |||||
| ->setLabel(pht('Modified After')) | |||||
| ->setKey('modifiedStart') | |||||
| ->setIsHidden(true) | |||||
| ->setDescription( | |||||
| pht('Find revisions modified at or after a particular time.')), | |||||
| id(new PhabricatorSearchDateField()) | |||||
| ->setLabel(pht('Modified Before')) | |||||
| ->setKey('modifiedEnd') | |||||
| ->setIsHidden(true) | |||||
| ->setDescription( | |||||
| pht('Find revisions modified at or before a particular time.')), | |||||
| ); | ); | ||||
| } | } | ||||
| protected function getURI($path) { | protected function getURI($path) { | ||||
| return '/differential/'.$path; | return '/differential/'.$path; | ||||
| } | } | ||||
| protected function getBuiltinQueryNames() { | protected function getBuiltinQueryNames() { | ||||
| ▲ Show 20 Lines • Show All 255 Lines • Show Last 20 Lines | |||||