X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHashtag.php;h=471515e6296ea4cccdc63a0833454b035a720eb6;hb=036b565a7846916f763ce1dcbcaade0844ff1589;hp=8708a464a9e3d09069f174e8986ba031b373117f;hpb=bd62d548db39b617d087aabb536435004adf0470;p=friendica.git diff --git a/src/Module/Hashtag.php b/src/Module/Hashtag.php index 8708a464a9..471515e629 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($parameters) + protected function content(array $request = []): string { $result = []; @@ -24,15 +40,14 @@ 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); System::jsonExit($result); + + return ''; } }