X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHashtag.php;h=365e77572cfa50f1227534b273ee4dfd4652e1fc;hb=52ea22505d109d07033066d4a45c1b785ceade33;hp=a460ae1d98887a25562e6299d2f91e9b5347177b;hpb=f2c31ef1c0e92208b58d22791fc72d0ad3e3d6ae;p=friendica.git diff --git a/src/Module/Hashtag.php b/src/Module/Hashtag.php index a460ae1d98..365e77572c 100644 --- a/src/Module/Hashtag.php +++ b/src/Module/Hashtag.php @@ -1,7 +1,24 @@ . + * */ + namespace Friendica\Module; use Friendica\BaseModule; @@ -14,7 +31,6 @@ use Friendica\Util\Strings; */ class Hashtag extends BaseModule { - 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);