Page MenuHomePhabricator

D9500.diff
No OneTemporary

D9500.diff

diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php
--- a/src/__phutil_library_map__.php
+++ b/src/__phutil_library_map__.php
@@ -1495,6 +1495,7 @@
'PhabricatorDashboardPanelQuery' => 'applications/dashboard/query/PhabricatorDashboardPanelQuery.php',
'PhabricatorDashboardPanelRenderController' => 'applications/dashboard/controller/PhabricatorDashboardPanelRenderController.php',
'PhabricatorDashboardPanelRenderingEngine' => 'applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php',
+ 'PhabricatorDashboardPanelSearchApplicationCustomField' => 'applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php',
'PhabricatorDashboardPanelSearchEngine' => 'applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php',
'PhabricatorDashboardPanelTransaction' => 'applications/dashboard/storage/PhabricatorDashboardPanelTransaction.php',
'PhabricatorDashboardPanelTransactionEditor' => 'applications/dashboard/editor/PhabricatorDashboardPanelTransactionEditor.php',
@@ -4319,6 +4320,7 @@
'PhabricatorDashboardPanelQuery' => 'PhabricatorCursorPagedPolicyAwareQuery',
'PhabricatorDashboardPanelRenderController' => 'PhabricatorDashboardController',
'PhabricatorDashboardPanelRenderingEngine' => 'Phobject',
+ 'PhabricatorDashboardPanelSearchApplicationCustomField' => 'PhabricatorStandardCustomField',
'PhabricatorDashboardPanelSearchEngine' => 'PhabricatorApplicationSearchEngine',
'PhabricatorDashboardPanelTransaction' => 'PhabricatorApplicationTransaction',
'PhabricatorDashboardPanelTransactionEditor' => 'PhabricatorApplicationTransactionEditor',
diff --git a/src/applications/audit/query/PhabricatorCommitSearchEngine.php b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
--- a/src/applications/audit/query/PhabricatorCommitSearchEngine.php
+++ b/src/applications/audit/query/PhabricatorCommitSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorCommitSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Commits');
+ }
+
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
--- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
+++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorCalendarEventSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Calendar Events');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationCalendar';
}
diff --git a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php
--- a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php
+++ b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorConduitSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Conduit Methods');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationConduit';
}
diff --git a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php
--- a/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php
+++ b/src/applications/countdown/query/PhabricatorCountdownSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorCountdownSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Countdowns');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationCountdown';
}
diff --git a/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
new file mode 100644
--- /dev/null
+++ b/src/applications/dashboard/customfield/PhabricatorDashboardPanelSearchApplicationCustomField.php
@@ -0,0 +1,40 @@
+<?php
+
+final class PhabricatorDashboardPanelSearchApplicationCustomField
+ extends PhabricatorStandardCustomField {
+
+ public function getFieldType() {
+ return 'search.application';
+ }
+
+ public function shouldAppearInApplicationSearch() {
+ return false;
+ }
+
+ public function renderEditControl(array $handles) {
+
+ $engines = id(new PhutilSymbolLoader())
+ ->setAncestorClass('PhabricatorApplicationSearchEngine')
+ ->loadObjects();
+
+ $options = array();
+
+ $value = $this->getFieldValue();
+ if (strlen($value) && empty($engines[$value])) {
+ $options[$value] = $value;
+ }
+
+ $engines = msort($engines, 'getResultTypeDescription');
+ foreach ($engines as $class_name => $engine) {
+ $options[$class_name] = $engine->getResultTypeDescription();
+ }
+
+ return id(new AphrontFormSelectControl())
+ ->setLabel($this->getFieldName())
+ ->setCaption($this->getCaption())
+ ->setName($this->getFieldKey())
+ ->setValue($this->getFieldValue())
+ ->setOptions($options);
+ }
+
+}
diff --git a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
--- a/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
+++ b/src/applications/dashboard/paneltype/PhabricatorDashboardPanelTypeQuery.php
@@ -20,11 +20,11 @@
public function getFieldSpecifications() {
return array(
'class' => array(
- 'name' => pht('ApplicationSearch Class'),
- 'type' => 'text',
+ 'name' => pht('Search For'),
+ 'type' => 'search.application',
),
'key' => array(
- 'name' => pht('ApplicationSearch Key'),
+ 'name' => pht('Query'),
'type' => 'text',
),
'limit' => array(
diff --git a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
--- a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
+++ b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorDashboardPanelSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Dashboard Panels');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDashboard';
}
diff --git a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php
--- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php
+++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorDashboardSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Dashboards');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDashboard';
}
diff --git a/src/applications/differential/query/DifferentialRevisionSearchEngine.php b/src/applications/differential/query/DifferentialRevisionSearchEngine.php
--- a/src/applications/differential/query/DifferentialRevisionSearchEngine.php
+++ b/src/applications/differential/query/DifferentialRevisionSearchEngine.php
@@ -3,6 +3,10 @@
final class DifferentialRevisionSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Differential Revisions');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDifferential';
}
diff --git a/src/applications/diviner/query/DivinerAtomSearchEngine.php b/src/applications/diviner/query/DivinerAtomSearchEngine.php
--- a/src/applications/diviner/query/DivinerAtomSearchEngine.php
+++ b/src/applications/diviner/query/DivinerAtomSearchEngine.php
@@ -3,6 +3,10 @@
final class DivinerAtomSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Documentation Atoms');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDiviner';
}
diff --git a/src/applications/drydock/query/DrydockBlueprintSearchEngine.php b/src/applications/drydock/query/DrydockBlueprintSearchEngine.php
--- a/src/applications/drydock/query/DrydockBlueprintSearchEngine.php
+++ b/src/applications/drydock/query/DrydockBlueprintSearchEngine.php
@@ -3,6 +3,10 @@
final class DrydockBlueprintSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Drydock Blueprints');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDrydock';
}
diff --git a/src/applications/drydock/query/DrydockLeaseSearchEngine.php b/src/applications/drydock/query/DrydockLeaseSearchEngine.php
--- a/src/applications/drydock/query/DrydockLeaseSearchEngine.php
+++ b/src/applications/drydock/query/DrydockLeaseSearchEngine.php
@@ -3,6 +3,10 @@
final class DrydockLeaseSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Drydock Leases');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDrydock';
}
diff --git a/src/applications/drydock/query/DrydockLogSearchEngine.php b/src/applications/drydock/query/DrydockLogSearchEngine.php
--- a/src/applications/drydock/query/DrydockLogSearchEngine.php
+++ b/src/applications/drydock/query/DrydockLogSearchEngine.php
@@ -3,6 +3,10 @@
final class DrydockLogSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Drydock Logs');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDrydock';
}
diff --git a/src/applications/drydock/query/DrydockResourceSearchEngine.php b/src/applications/drydock/query/DrydockResourceSearchEngine.php
--- a/src/applications/drydock/query/DrydockResourceSearchEngine.php
+++ b/src/applications/drydock/query/DrydockResourceSearchEngine.php
@@ -3,6 +3,10 @@
final class DrydockResourceSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Drydock Resources');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDrydock';
}
diff --git a/src/applications/feed/query/PhabricatorFeedSearchEngine.php b/src/applications/feed/query/PhabricatorFeedSearchEngine.php
--- a/src/applications/feed/query/PhabricatorFeedSearchEngine.php
+++ b/src/applications/feed/query/PhabricatorFeedSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorFeedSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Feed Stories');
+ }
+
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
diff --git a/src/applications/files/query/PhabricatorFileSearchEngine.php b/src/applications/files/query/PhabricatorFileSearchEngine.php
--- a/src/applications/files/query/PhabricatorFileSearchEngine.php
+++ b/src/applications/files/query/PhabricatorFileSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorFileSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Files');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationFiles';
}
diff --git a/src/applications/flag/query/PhabricatorFlagSearchEngine.php b/src/applications/flag/query/PhabricatorFlagSearchEngine.php
--- a/src/applications/flag/query/PhabricatorFlagSearchEngine.php
+++ b/src/applications/flag/query/PhabricatorFlagSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorFlagSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Flags');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationFlags';
}
diff --git a/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php b/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php
--- a/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php
+++ b/src/applications/harbormaster/query/HarbormasterBuildPlanSearchEngine.php
@@ -3,6 +3,10 @@
final class HarbormasterBuildPlanSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Harbormaster Build Plans');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationHarbormaster';
}
diff --git a/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php b/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php
--- a/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php
+++ b/src/applications/harbormaster/query/HarbormasterBuildableSearchEngine.php
@@ -3,6 +3,10 @@
final class HarbormasterBuildableSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Harbormaster Buildables');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationHarbormaster';
}
diff --git a/src/applications/herald/query/HeraldRuleSearchEngine.php b/src/applications/herald/query/HeraldRuleSearchEngine.php
--- a/src/applications/herald/query/HeraldRuleSearchEngine.php
+++ b/src/applications/herald/query/HeraldRuleSearchEngine.php
@@ -3,6 +3,10 @@
final class HeraldRuleSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Herald Rules');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationHerald';
}
diff --git a/src/applications/herald/query/HeraldTranscriptSearchEngine.php b/src/applications/herald/query/HeraldTranscriptSearchEngine.php
--- a/src/applications/herald/query/HeraldTranscriptSearchEngine.php
+++ b/src/applications/herald/query/HeraldTranscriptSearchEngine.php
@@ -3,6 +3,10 @@
final class HeraldTranscriptSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Herald Transcripts');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationHerald';
}
diff --git a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
--- a/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
+++ b/src/applications/legalpad/query/LegalpadDocumentSearchEngine.php
@@ -3,6 +3,10 @@
final class LegalpadDocumentSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Legalpad Documents');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationLegalpad';
}
diff --git a/src/applications/macro/query/PhabricatorMacroSearchEngine.php b/src/applications/macro/query/PhabricatorMacroSearchEngine.php
--- a/src/applications/macro/query/PhabricatorMacroSearchEngine.php
+++ b/src/applications/macro/query/PhabricatorMacroSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorMacroSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Macros');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationMacro';
}
diff --git a/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php b/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php
--- a/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php
+++ b/src/applications/mailinglists/query/PhabricatorMailingListSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorMailingListSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Mailing Lists');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationMailingLists';
}
diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
--- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
+++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php
@@ -30,6 +30,10 @@
return $this;
}
+ public function getResultTypeDescription() {
+ return pht('Tasks');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationManiphest';
}
diff --git a/src/applications/meta/query/PhabricatorAppSearchEngine.php b/src/applications/meta/query/PhabricatorAppSearchEngine.php
--- a/src/applications/meta/query/PhabricatorAppSearchEngine.php
+++ b/src/applications/meta/query/PhabricatorAppSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorAppSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Applications');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationApplications';
}
diff --git a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
--- a/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
+++ b/src/applications/oauthserver/query/PhabricatorOAuthServerClientSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorOAuthServerClientSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('OAuth Clients');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationOAuthServer';
}
diff --git a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php
--- a/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php
+++ b/src/applications/passphrase/query/PassphraseCredentialSearchEngine.php
@@ -3,6 +3,10 @@
final class PassphraseCredentialSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Passphrase Credentials');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPassphrase';
}
diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
--- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php
+++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorPasteSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Pastes');
+ }
+
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
$saved->setParameter(
diff --git a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
--- a/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
+++ b/src/applications/people/query/PhabricatorPeopleLogSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorPeopleLogSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Account Activity');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPeople';
}
diff --git a/src/applications/people/query/PhabricatorPeopleSearchEngine.php b/src/applications/people/query/PhabricatorPeopleSearchEngine.php
--- a/src/applications/people/query/PhabricatorPeopleSearchEngine.php
+++ b/src/applications/people/query/PhabricatorPeopleSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorPeopleSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Users');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPeople';
}
diff --git a/src/applications/pholio/query/PholioMockSearchEngine.php b/src/applications/pholio/query/PholioMockSearchEngine.php
--- a/src/applications/pholio/query/PholioMockSearchEngine.php
+++ b/src/applications/pholio/query/PholioMockSearchEngine.php
@@ -3,6 +3,10 @@
final class PholioMockSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Pholio Mocks');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPholio';
}
diff --git a/src/applications/phrequent/query/PhrequentSearchEngine.php b/src/applications/phrequent/query/PhrequentSearchEngine.php
--- a/src/applications/phrequent/query/PhrequentSearchEngine.php
+++ b/src/applications/phrequent/query/PhrequentSearchEngine.php
@@ -3,6 +3,10 @@
final class PhrequentSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Phrequent Time');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPhrequent';
}
diff --git a/src/applications/phriction/query/PhrictionSearchEngine.php b/src/applications/phriction/query/PhrictionSearchEngine.php
--- a/src/applications/phriction/query/PhrictionSearchEngine.php
+++ b/src/applications/phriction/query/PhrictionSearchEngine.php
@@ -3,6 +3,10 @@
final class PhrictionSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Wiki Documents');
+ }
+
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
diff --git a/src/applications/ponder/query/PonderQuestionSearchEngine.php b/src/applications/ponder/query/PonderQuestionSearchEngine.php
--- a/src/applications/ponder/query/PonderQuestionSearchEngine.php
+++ b/src/applications/ponder/query/PonderQuestionSearchEngine.php
@@ -3,6 +3,10 @@
final class PonderQuestionSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Ponder Questions');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationPonder';
}
diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php
--- a/src/applications/project/query/PhabricatorProjectSearchEngine.php
+++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorProjectSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Projects');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationProject';
}
diff --git a/src/applications/releeph/query/ReleephBranchSearchEngine.php b/src/applications/releeph/query/ReleephBranchSearchEngine.php
--- a/src/applications/releeph/query/ReleephBranchSearchEngine.php
+++ b/src/applications/releeph/query/ReleephBranchSearchEngine.php
@@ -5,6 +5,10 @@
private $product;
+ public function getResultTypeDescription() {
+ return pht('Releeph Branches');
+ }
+
public function setProduct(ReleephProject $product) {
$this->product = $product;
return $this;
diff --git a/src/applications/releeph/query/ReleephProductSearchEngine.php b/src/applications/releeph/query/ReleephProductSearchEngine.php
--- a/src/applications/releeph/query/ReleephProductSearchEngine.php
+++ b/src/applications/releeph/query/ReleephProductSearchEngine.php
@@ -3,6 +3,10 @@
final class ReleephProductSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Releeph Products');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationReleeph';
}
diff --git a/src/applications/releeph/query/ReleephRequestSearchEngine.php b/src/applications/releeph/query/ReleephRequestSearchEngine.php
--- a/src/applications/releeph/query/ReleephRequestSearchEngine.php
+++ b/src/applications/releeph/query/ReleephRequestSearchEngine.php
@@ -6,6 +6,10 @@
private $branch;
private $baseURI;
+ public function getResultTypeDescription() {
+ return pht('Releeph Pull Requests');
+ }
+
public function setBranch(ReleephBranch $branch) {
$this->branch = $branch;
return $this;
diff --git a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
--- a/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
+++ b/src/applications/repository/query/PhabricatorRepositoryPushLogSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorRepositoryPushLogSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Push Logs');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDiffusion';
}
diff --git a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php
--- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php
+++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorRepositorySearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Repositories');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationDiffusion';
}
diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
--- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
+++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php
@@ -120,6 +120,18 @@
abstract protected function getURI($path);
+ /**
+ * Return a human readable description of the type of objects this query
+ * searches for.
+ *
+ * For example, "Tasks" or "Commits".
+ *
+ * @return string Human-readable description of what this engine is used to
+ * find.
+ */
+ abstract public function getResultTypeDescription();
+
+
public function newSavedQuery() {
return id(new PhabricatorSavedQuery())
->setEngineClassName(get_class($this));
diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
--- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
+++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorSearchApplicationSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Fulltext Results');
+ }
+
public function getApplicationClassName() {
return 'PhabricatorApplicationSearch';
}
diff --git a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php
--- a/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php
+++ b/src/applications/slowvote/query/PhabricatorSlowvoteSearchEngine.php
@@ -3,6 +3,10 @@
final class PhabricatorSlowvoteSearchEngine
extends PhabricatorApplicationSearchEngine {
+ public function getResultTypeDescription() {
+ return pht('Slowvotes');
+ }
+
public function buildSavedQueryFromRequest(AphrontRequest $request) {
$saved = new PhabricatorSavedQuery();
$saved->setParameter(

File Metadata

Mime Type
text/plain
Expires
Sat, Feb 1, 10:34 AM (12 h, 40 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7081543
Default Alt Text
D9500.diff (28 KB)

Event Timeline