Avoid duplicated attachments / unwanted attachments

This commit is contained in:
Michael 2021-05-05 16:46:55 +00:00
parent 83de8fa891
commit f683f791ee
3 changed files with 29 additions and 34 deletions

View file

@ -2871,7 +2871,8 @@ class Item
$found = true;
}
}
if (!$found) {
// @todo Judge between the links to use the one with most information
if (!$found && (empty($attachment) || empty($attachment['name']) || empty($attachment['description']))) {
$attachment = $link;
}
}