mirror of
https://github.com/friendica/friendica
synced 2025-04-26 15:50:10 +00:00
Some changes for better code quality
This commit is contained in:
parent
b043c7e0f2
commit
82987d018a
7 changed files with 17 additions and 23 deletions
|
@ -33,9 +33,9 @@ class Term
|
|||
return $tag_text;
|
||||
}
|
||||
|
||||
public static function tagArrayFromItemId($itemid)
|
||||
public static function tagArrayFromItemId($itemid, $type = [TERM_HASHTAG, TERM_MENTION])
|
||||
{
|
||||
$condition = ['otype' => TERM_OBJ_POST, 'oid' => $itemid, 'type' => [TERM_HASHTAG, TERM_MENTION]];
|
||||
$condition = ['otype' => TERM_OBJ_POST, 'oid' => $itemid, 'type' => $type];
|
||||
$tags = DBA::select('term', ['type', 'term', 'url'], $condition);
|
||||
if (!DBA::isResult($tags)) {
|
||||
return [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue