From ec7eb9d83a86ba1b63c2f9d0a68c2afd25c5d7fd Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Tue, 24 Dec 2019 17:15:41 -0500 Subject: [PATCH] Rename BaseSearchModule::performSearch to performContactSearch to remove purpose confusion --- src/Module/BaseSearchModule.php | 4 ++-- src/Module/Search/Directory.php | 2 +- src/Module/Search/Index.php | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Module/BaseSearchModule.php b/src/Module/BaseSearchModule.php index 9766c000c..96692b0b2 100644 --- a/src/Module/BaseSearchModule.php +++ b/src/Module/BaseSearchModule.php @@ -22,7 +22,7 @@ use Friendica\Util\Strings; class BaseSearchModule extends BaseModule { /** - * Performs a search with an optional prefix + * Performs a contact search with an optional prefix * * @param string $search Search query * @param string $prefix A optional prefix (e.g. @ or !) for searching @@ -31,7 +31,7 @@ class BaseSearchModule extends BaseModule * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public static function performSearch($search, $prefix = '') + public static function performContactSearch($search, $prefix = '') { $a = self::getApp(); $config = $a->getConfig(); diff --git a/src/Module/Search/Directory.php b/src/Module/Search/Directory.php index b18847afe..e3515713f 100644 --- a/src/Module/Search/Directory.php +++ b/src/Module/Search/Directory.php @@ -31,6 +31,6 @@ class Directory extends BaseSearchModule $a->page['aside'] .= Widget::findPeople(); $a->page['aside'] .= Widget::follow(); - return self::performSearch($search); + return self::performContactSearch($search); } } diff --git a/src/Module/Search/Index.php b/src/Module/Search/Index.php index 7c52c7e79..8921c07aa 100644 --- a/src/Module/Search/Index.php +++ b/src/Module/Search/Index.php @@ -88,7 +88,7 @@ class Index extends BaseSearchModule } if (strpos($search, '@') === 0 || strpos($search, '!') === 0) { - return self::performSearch($search); + return self::performContactSearch($search); } if (parse_url($search, PHP_URL_SCHEME) != '') { @@ -109,9 +109,9 @@ class Index extends BaseSearchModule $tag = true; break; case 'contacts': - return self::performSearch($search, '@'); + return self::performContactSearch($search, '@'); case 'forums': - return self::performSearch($search, '!'); + return self::performContactSearch($search, '!'); } }