Editing/removing of attached pictures is now possible via web

This commit is contained in:
Michael 2023-02-27 07:47:31 +00:00
parent a40ecb3902
commit 5f6503a73f
6 changed files with 82 additions and 28 deletions

View file

@ -1675,7 +1675,7 @@ class Transmitter
if ($type == 'Page') {
// When we transmit "Page" posts we have to remove the attachment.
// The attachment contains the link that we already transmit in the "url" field.
$body = preg_replace("/\s*\[attachment .*?\].*?\[\/attachment\]\s*/ism", '', $body);
$body = BBCode::removeAttachment($body);
}
$body = BBCode::setMentionsToNicknames($body);
@ -1707,7 +1707,7 @@ class Transmitter
$richbody = DI::contentItem()->addSharedPost($item, $richbody);
}
}
$richbody = BBCode::removeAttachment($richbody);
$richbody = BBCode::replaceAttachment($richbody);
$data['contentMap'][$language] = BBCode::convertForUriId($item['uri-id'], $richbody, BBCode::EXTERNAL);
}