Simplified code
This commit is contained in:
parent
68d6e11d83
commit
f1f13db24f
|
@ -672,12 +672,9 @@ class Item
|
||||||
|
|
||||||
// If it is a reshared post then reformat it to avoid display problems with two share elements
|
// If it is a reshared post then reformat it to avoid display problems with two share elements
|
||||||
if (Diaspora::isReshare($item['body'], false)) {
|
if (Diaspora::isReshare($item['body'], false)) {
|
||||||
if (!empty($shared['guid'])) {
|
if (!empty($shared['guid']) && ($encaspulated_share = self::createSharedPostByGuid($shared['guid']))) {
|
||||||
$encaspulated_share = self::createSharedPostByGuid($shared['guid']);
|
|
||||||
if (!empty($encaspulated_share)) {
|
|
||||||
$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
|
$item['body'] = preg_replace("/\[share.*?\](.*)\[\/share\]/ism", $encaspulated_share, $item['body']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
|
$item['body'] = HTML::toBBCode(BBCode::convertForUriId($item['uri-id'], $item['body'], BBCode::ACTIVITYPUB));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user