Rename BaseSearchModule::performSearch to performContactSearch to remove purpose confusion

This commit is contained in:
Hypolite Petovan 2019-12-24 17:15:41 -05:00
parent 2056e6a5c4
commit ec7eb9d83a
3 changed files with 6 additions and 6 deletions

View File

@ -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();

View File

@ -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);
}
}

View File

@ -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, '!');
}
}