X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHashtag.php;h=365e77572cfa50f1227534b273ee4dfd4652e1fc;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=411da5ce5eafd0300b0a1d38eb318d59acb53792;hpb=7efde8e334d6ca52fd1608fb9a78babcea4bdc9f;p=friendica.git diff --git a/src/Module/Hashtag.php b/src/Module/Hashtag.php index 411da5ce5e..365e77572c 100644 --- a/src/Module/Hashtag.php +++ b/src/Module/Hashtag.php @@ -1,7 +1,24 @@ . + * */ + namespace Friendica\Module; use Friendica\BaseModule; @@ -14,8 +31,7 @@ use Friendica\Util\Strings; */ class Hashtag extends BaseModule { - - public static function content() + public static function content(array $parameters = []) { $result = []; @@ -24,12 +40,9 @@ class Hashtag extends BaseModule System::jsonExit($result); } - $taglist = DBA::p("SELECT DISTINCT(`term`) FROM `term` WHERE `term` LIKE ? AND `type` = ? ORDER BY `term`", - $t . '%', - intval(TERM_HASHTAG) - ); + $taglist = DBA::select('tag', ['name'], ["`name` LIKE ?", $t . "%"], ['order' => ['name'], 'limit' => 100]); while ($tag = DBA::fetch($taglist)) { - $result[] = ['text' => $tag['term']]; + $result[] = ['text' => $tag['name']]; } DBA::close($taglist);