mirror of
https://github.com/friendica/friendica
synced 2024-12-26 08:40:16 +00:00
31 lines
488 B
PHP
31 lines
488 B
PHP
<?php
|
|
|
|
namespace Friendica\Model;
|
|
|
|
use Friendica\Database\DBA;
|
|
|
|
/**
|
|
* Model for DB specific logic for the search entity
|
|
*/
|
|
class Search
|
|
{
|
|
/**
|
|
* 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;
|
|
}
|
|
}
|