Fix link comparism

This commit is contained in:
Michael 2021-04-29 18:23:04 +00:00
parent 5c9a5e736c
commit 6ab35c20e0

View File

@ -30,6 +30,7 @@ use Friendica\Database\DBA;
use Friendica\DI; use Friendica\DI;
use Friendica\Util\Images; use Friendica\Util\Images;
use Friendica\Util\ParseUrl; use Friendica\Util\ParseUrl;
use Friendica\Util\Strings;
/** /**
* Class Media * Class Media
@ -465,9 +466,10 @@ class Media
$selected = ''; $selected = '';
foreach ($media as $medium) { foreach ($media as $medium) {
$medium['url'] = strtolower($medium['url']); foreach ($links as $link) {
if (in_array($medium['url'], $links)) { if (Strings::compareLink($link, $medium['url'])) {
continue; continue 2;
}
} }
$type = explode('/', current(explode(';', $medium['mimetype']))); $type = explode('/', current(explode(';', $medium['mimetype'])));