diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ae043b7eb5..1ba136f168 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2218,6 +2218,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleRenameController' => 'applications/people/controller/PhabricatorPeopleRenameController.php', 'PhabricatorPeopleSearchEngine' => 'applications/people/query/PhabricatorPeopleSearchEngine.php', 'PhabricatorPeopleTestDataGenerator' => 'applications/people/lipsum/PhabricatorPeopleTestDataGenerator.php', + 'PhabricatorPeopleUserFunctionDatasource' => 'applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php', 'PhabricatorPeopleUserPHIDType' => 'applications/people/phid/PhabricatorPeopleUserPHIDType.php', 'PhabricatorPeopleWelcomeController' => 'applications/people/controller/PhabricatorPeopleWelcomeController.php', 'PhabricatorPersonaAuthProvider' => 'applications/auth/provider/PhabricatorPersonaAuthProvider.php', @@ -2652,7 +2653,6 @@ phutil_register_library_map(array( 'PhabricatorTypeaheadResult' => 'applications/typeahead/storage/PhabricatorTypeaheadResult.php', 'PhabricatorTypeaheadRuntimeCompositeDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadRuntimeCompositeDatasource.php', 'PhabricatorTypeaheadTokenView' => 'applications/typeahead/view/PhabricatorTypeaheadTokenView.php', - 'PhabricatorTypeaheadUserParameterizedDatasource' => 'applications/typeahead/datasource/PhabricatorTypeaheadUserParameterizedDatasource.php', 'PhabricatorUIConfigOptions' => 'applications/config/option/PhabricatorUIConfigOptions.php', 'PhabricatorUIExample' => 'applications/uiexample/examples/PhabricatorUIExample.php', 'PhabricatorUIExampleRenderController' => 'applications/uiexample/controller/PhabricatorUIExampleRenderController.php', @@ -5590,6 +5590,7 @@ phutil_register_library_map(array( 'PhabricatorPeopleRenameController' => 'PhabricatorPeopleController', 'PhabricatorPeopleSearchEngine' => 'PhabricatorApplicationSearchEngine', 'PhabricatorPeopleTestDataGenerator' => 'PhabricatorTestDataGenerator', + 'PhabricatorPeopleUserFunctionDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorPeopleUserPHIDType' => 'PhabricatorPHIDType', 'PhabricatorPeopleWelcomeController' => 'PhabricatorPeopleController', 'PhabricatorPersonaAuthProvider' => 'PhabricatorAuthProvider', @@ -6072,7 +6073,6 @@ phutil_register_library_map(array( 'PhabricatorTypeaheadMonogramDatasource' => 'PhabricatorTypeaheadDatasource', 'PhabricatorTypeaheadRuntimeCompositeDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorTypeaheadTokenView' => 'AphrontTagView', - 'PhabricatorTypeaheadUserParameterizedDatasource' => 'PhabricatorTypeaheadCompositeDatasource', 'PhabricatorUIConfigOptions' => 'PhabricatorApplicationConfigOptions', 'PhabricatorUIExampleRenderController' => 'PhabricatorController', 'PhabricatorUIExamplesApplication' => 'PhabricatorApplication', diff --git a/src/applications/differential/query/DifferentialRevisionSearchEngine.php b/src/applications/differential/query/DifferentialRevisionSearchEngine.php index 87b25b9aad..782394687e 100644 --- a/src/applications/differential/query/DifferentialRevisionSearchEngine.php +++ b/src/applications/differential/query/DifferentialRevisionSearchEngine.php @@ -71,7 +71,7 @@ final class DifferentialRevisionSearchEngine ->needDrafts(true) ->needRelationships(true); - $datasource = id(new PhabricatorTypeaheadUserParameterizedDatasource()) + $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) ->setViewer($this->requireViewer()); $responsible_phids = $saved->getParameter('responsiblePHIDs', array()); @@ -140,7 +140,7 @@ final class DifferentialRevisionSearchEngine id(new AphrontFormTokenizerControl()) ->setLabel(pht('Responsible Users')) ->setName('responsibles') - ->setDatasource(new PhabricatorTypeaheadUserParameterizedDatasource()) + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) ->setValue($responsible_phids)) ->appendControl( id(new AphrontFormTokenizerControl()) diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index e65ad9be2b..6c755a74e3 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -113,7 +113,7 @@ final class ManiphestTaskSearchEngine $viewer = $this->requireViewer(); - $datasource = id(new PhabricatorTypeaheadUserParameterizedDatasource()) + $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) ->setViewer($viewer); $author_phids = $saved->getParameter('authorPHIDs', array()); @@ -265,7 +265,7 @@ final class ManiphestTaskSearchEngine ->setValue($projects)) ->appendControl( id(new AphrontFormTokenizerControl()) - ->setDatasource(new PhabricatorTypeaheadUserParameterizedDatasource()) + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) ->setName('authors') ->setLabel(pht('Authors')) ->setValue($author_phids)) diff --git a/src/applications/typeahead/datasource/PhabricatorTypeaheadUserParameterizedDatasource.php b/src/applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php similarity index 88% rename from src/applications/typeahead/datasource/PhabricatorTypeaheadUserParameterizedDatasource.php rename to src/applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php index 373326ce38..ed291c96ef 100644 --- a/src/applications/typeahead/datasource/PhabricatorTypeaheadUserParameterizedDatasource.php +++ b/src/applications/people/typeahead/PhabricatorPeopleUserFunctionDatasource.php @@ -1,6 +1,6 @@ needImages(true) ->needTokenCounts(true); - $datasource = id(new PhabricatorTypeaheadUserParameterizedDatasource()) + $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) ->setViewer($this->requireViewer()); $author_phids = $saved->getParameter('authorPHIDs', array()); @@ -72,7 +72,7 @@ final class PholioMockSearchEngine extends PhabricatorApplicationSearchEngine { $form ->appendControl( id(new AphrontFormTokenizerControl()) - ->setDatasource(new PhabricatorTypeaheadUserParameterizedDatasource()) + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) ->setName('authors') ->setLabel(pht('Authors')) ->setValue($author_phids)) diff --git a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php index d51d182217..15ffc82205 100644 --- a/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php +++ b/src/applications/search/query/PhabricatorSearchApplicationSearchEngine.php @@ -62,7 +62,7 @@ final class PhabricatorSearchApplicationSearchEngine $config->setParameter('ownerPHIDs', $owner_phids); - $datasource = id(new PhabricatorTypeaheadUserParameterizedDatasource()) + $datasource = id(new PhabricatorPeopleUserFunctionDatasource()) ->setViewer($viewer); $author_phids = $config->getParameter('authorPHIDs', array()); $author_phids = $datasource->evaluateTokens($author_phids); @@ -142,7 +142,7 @@ final class PhabricatorSearchApplicationSearchEngine id(new AphrontFormTokenizerControl()) ->setName('authorPHIDs') ->setLabel('Authors') - ->setDatasource(new PhabricatorTypeaheadUserParameterizedDatasource()) + ->setDatasource(new PhabricatorPeopleUserFunctionDatasource()) ->setValue($author_phids)) ->appendControl( id(new AphrontFormTokenizerControl())