mirror of
https://github.com/friendica/friendica
synced 2024-12-23 11:20:15 +00:00
Merge pull request #12912 from HankG/fix-cant-remove-attachment
Fix cant remove attachment
This commit is contained in:
commit
d886a53af0
2 changed files with 10 additions and 8 deletions
|
@ -201,6 +201,8 @@ class Item
|
||||||
$notify_items = [];
|
$notify_items = [];
|
||||||
|
|
||||||
while ($item = DBA::fetch($items)) {
|
while ($item = DBA::fetch($items)) {
|
||||||
|
Post\Media::deleteByURIId($item['uri-id'], [Post\Media::HTML]);
|
||||||
|
|
||||||
if (!empty($fields['body'])) {
|
if (!empty($fields['body'])) {
|
||||||
if (!empty($item['quote-uri-id'])) {
|
if (!empty($item['quote-uri-id'])) {
|
||||||
$fields['body'] = BBCode::removeSharedData($fields['body']);
|
$fields['body'] = BBCode::removeSharedData($fields['body']);
|
||||||
|
|
|
@ -548,12 +548,12 @@
|
||||||
|
|
||||||
matches = attributes.match(/url='([\s\S]*?)'/im);
|
matches = attributes.match(/url='([\s\S]*?)'/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
url = matches[1].toLowerCase();
|
url = matches[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
matches = attributes.match(/url="([\s\S]*?)"/im);
|
matches = attributes.match(/url="([\s\S]*?)"/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
url = matches[1].toLowerCase();
|
url = matches[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(url !== '') {
|
if(url !== '') {
|
||||||
|
@ -564,12 +564,12 @@
|
||||||
|
|
||||||
matches = attributes.match(/title='([\s\S]*?)'/im);
|
matches = attributes.match(/title='([\s\S]*?)'/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
title = matches[1].toLowerCase();
|
title = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
matches = attributes.match(/title="([\s\S]*?)"/im);
|
matches = attributes.match(/title="([\s\S]*?)"/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
title = matches[1].toLowerCase();
|
title = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (title !== '') {
|
if (title !== '') {
|
||||||
|
@ -580,12 +580,12 @@
|
||||||
|
|
||||||
matches = attributes.match(/image='([\s\S]*?)'/im);
|
matches = attributes.match(/image='([\s\S]*?)'/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
image = matches[1].toLowerCase();
|
image = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
matches = attributes.match(/image="([\s\S]*?)"/im);
|
matches = attributes.match(/image="([\s\S]*?)"/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
image = matches[1].toLowerCase();
|
image = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image !== '') {
|
if (image !== '') {
|
||||||
|
@ -596,12 +596,12 @@
|
||||||
|
|
||||||
matches = attributes.match(/preview='([\s\S]*?)'/im);
|
matches = attributes.match(/preview='([\s\S]*?)'/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
preview = matches[1].toLowerCase();
|
preview = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
matches = attributes.match(/preview="([\s\S]*?)"/im);
|
matches = attributes.match(/preview="([\s\S]*?)"/im);
|
||||||
if (matches !== null && typeof matches[1] !== 'undefined') {
|
if (matches !== null && typeof matches[1] !== 'undefined') {
|
||||||
preview = matches[1].toLowerCase();
|
preview = trim(matches[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preview !== '') {
|
if (preview !== '') {
|
||||||
|
|
Loading…
Reference in a new issue