reverse logic

This commit is contained in:
nobody 2021-03-08 18:41:29 -08:00
parent a4d68f9fb1
commit 435ac66063

View file

@ -2417,11 +2417,11 @@ class Activity {
$s['title'] = (($response_activity) ? EMPTY_STR : self::bb_content($content,'name')); $s['title'] = (($response_activity) ? EMPTY_STR : self::bb_content($content,'name'));
$s['summary'] = self::bb_content($content,'summary'); $s['summary'] = self::bb_content($content,'summary');
if (array_key_exists('mimetype',$s) && in_array($s['mimetype'], [ 'text/bbcode', 'text/x-multicode' ])) { if (array_key_exists('mimetype',$s) && (! in_array($s['mimetype'], [ 'text/bbcode', 'text/x-multicode' ]))) {
$s['body'] = ((self::bb_content($content,'bbcode') && (! $response_activity)) ? self::bb_content($content,'bbcode') : self::bb_content($content,'content')); $s['body'] = $content['content'];
} }
else { else {
$s['body'] = $content['content']; $s['body'] = ((self::bb_content($content,'bbcode') && (! $response_activity)) ? self::bb_content($content,'bbcode') : self::bb_content($content,'content'));
} }
@ -2803,7 +2803,7 @@ class Activity {
static function rewrite_mentions_sub(&$s, $pref, &$obj = null) { static function rewrite_mentions_sub(&$s, $pref, &$obj = null) {
if ($s['term']) { if (isset($s['term']) && is_array($s['term'])) {
foreach ($s['term'] as $tag) { foreach ($s['term'] as $tag) {
$txt = EMPTY_STR; $txt = EMPTY_STR;
if (intval($tag['ttype']) === TERM_MENTION) { if (intval($tag['ttype']) === TERM_MENTION) {