3 * @file src/Module/Hashtag.php
5 namespace Friendica\Module;
7 use Friendica\BaseModule;
8 use Friendica\Core\System;
9 use Friendica\Database\DBA;
10 use Friendica\Util\Strings;
15 class Hashtag extends BaseModule
18 public static function content()
22 $t = Strings::escapeHtml($_REQUEST['t']);
24 System::jsonExit($result);
27 $taglist = DBA::p("SELECT DISTINCT(`term`) FROM `term` WHERE `term` LIKE ? AND `type` = ? ORDER BY `term`",
31 while ($tag = DBA::fetch($taglist)) {
32 $result[] = ['text' => $tag['term']];
36 System::jsonExit($result);