Term constants updated

This commit is contained in:
Michael 2020-04-13 19:24:22 +00:00
parent 552fd98657
commit 661dd43b0d
14 changed files with 31 additions and 51 deletions

View file

@ -23,6 +23,7 @@ namespace Friendica\Model;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Model\Term;
/**
* This class handles FileTag related functions
@ -195,11 +196,11 @@ class FileTag
if ($type == 'file') {
$lbracket = '[';
$rbracket = ']';
$termtype = TERM_FILE;
$termtype = Term::FILE;
} else {
$lbracket = '<';
$rbracket = '>';
$termtype = TERM_CATEGORY;
$termtype = Term::CATEGORY;
}
$filetags_updated = $saved;

View file

@ -40,10 +40,7 @@ class Term
const HASHTAG = 1;
const MENTION = 2;
const CATEGORY = 3;
const PCATEGORY = 4;
const FILE = 5;
const SAVEDSEARCH = 6;
const CONVERSATION = 7;
/**
* An implicit mention is a mention in a comment body that is redundant with the threading information.
*/

View file

@ -26,6 +26,7 @@ use Friendica\Core\Hook;
use Friendica\Database\DBA;
use Friendica\DI;
use Friendica\Util\Strings;
use Friendica\Model\Term;
class UserItem
{
@ -206,7 +207,7 @@ class UserItem
}
// Or the contact is a mentioned forum
$tags = DBA::select('term', ['url'], ['otype' => TERM_OBJ_POST, 'oid' => $item['id'], 'type' => TERM_MENTION, 'uid' => $uid]);
$tags = DBA::select('term', ['url'], ['otype' => term::OBJECT_TYPE_POST, 'oid' => $item['id'], 'type' => Term::MENTION, 'uid' => $uid]);
while ($tag = DBA::fetch($tags)) {
$condition = ['nurl' => Strings::normaliseLink($tag['url']), 'uid' => $uid, 'notify_new_posts' => true, 'contact-type' => Contact::TYPE_COMMUNITY];
if (DBA::exists('contact', $condition)) {