X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FSearch.php;h=4b09af72d870592003a5831a168110b80256b99c;hb=fdaff4303952427f222ee21f6b501d5087e25932;hp=5829ff91d0c7dc69eb3370f882a2587f593836e2;hpb=90248f6bb7227d0de15085a53bb6108f1e5a91ec;p=friendica.git diff --git a/src/Model/Search.php b/src/Model/Search.php index 5829ff91d0..4b09af72d8 100644 --- a/src/Model/Search.php +++ b/src/Model/Search.php @@ -1,32 +1,49 @@ . + * + */ namespace Friendica\Model; -use Friendica\BaseObject; use Friendica\Database\DBA; /** * Model for DB specific logic for the search entity */ -class Search extends BaseObject +class Search { /** * Returns the list of user defined tags (e.g. #Friendica) * * @return array - * * @throws \Exception */ - public static function getUserTags() + public static function getUserTags(): array { $termsStmt = DBA::p("SELECT DISTINCT(`term`) FROM `search`"); $tags = []; while ($term = DBA::fetch($termsStmt)) { - $tags[] = trim($term['term'], '#'); + $tags[] = trim(mb_strtolower($term['term']), '#'); } - + DBA::close($termsStmt); return $tags; } }