X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FHashtag.php;h=9c90b97b27cce16bc4e54c0100dbb031fe023a74;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=06c6374e3435020ab9f86f8b2ae102bfa2e6c1c0;hpb=661dd43b0ddac517ac254b68a2ab7a58b3c48153;p=friendica.git diff --git a/src/Module/Hashtag.php b/src/Module/Hashtag.php index 06c6374e34..9c90b97b27 100644 --- a/src/Module/Hashtag.php +++ b/src/Module/Hashtag.php @@ -1,6 +1,6 @@ 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 ?", Strings::escapeHtml($request['t']) . "%"], + ['order' => ['name'], 'limit' => 100] ); while ($tag = DBA::fetch($taglist)) { - $result[] = ['text' => $tag['term']]; + $result[] = ['text' => $tag['name']]; } DBA::close($taglist); - System::jsonExit($result); + $this->jsonExit($result); } }