Move .well-known, webfinger, xrd to src/Module/
This commit is contained in:
32
src/Model/Search.php
Normal file
32
src/Model/Search.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Friendica\Model;
|
||||
|
||||
use Friendica\BaseObject;
|
||||
use Friendica\Database\DBA;
|
||||
|
||||
/**
|
||||
* Model for DB specific logic for the search entity
|
||||
*/
|
||||
class Search extends BaseObject
|
||||
{
|
||||
/**
|
||||
* Returns the list of user defined tags (e.g. #Friendica)
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getUserTags()
|
||||
{
|
||||
$termsStmt = DBA::p("SELECT DISTINCT(`term`) FROM `search`");
|
||||
|
||||
$tags = [];
|
||||
|
||||
while ($term = DBA::fetch($termsStmt)) {
|
||||
$tags[] = trim($term['term'], '#');
|
||||
}
|
||||
|
||||
return $tags;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user