X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHashtag.php;h=365e77572cfa50f1227534b273ee4dfd4652e1fc;hb=aa0b485f3dca72c5448076e913fa54d948cd7731;hp=06c6374e3435020ab9f86f8b2ae102bfa2e6c1c0;hpb=43b8bdea07c2e7f49d2314f909524d154ce9346b;p=friendica.git diff --git a/src/Module/Hashtag.php b/src/Module/Hashtag.php index 06c6374e34..365e77572c 100644 --- a/src/Module/Hashtag.php +++ b/src/Module/Hashtag.php @@ -25,14 +25,12 @@ use Friendica\BaseModule; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Util\Strings; -use Friendica\Model\Term; /** * Hashtag module. */ class Hashtag extends BaseModule { - public static function content(array $parameters = []) { $result = []; @@ -42,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);