Merge pull request #6521 from JakubOnderka/cached-feed-url-match

chg: [feed] Check also URL without protocol
pull/6538/head
Jakub Onderka 2020-11-02 14:30:15 +01:00 committed by GitHub
commit 31df0d5a15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -380,6 +380,15 @@ class Feed extends AppModel
}
} else {
$parts = [$attribute['value']];
// Some feeds contains URL without protocol, so if attribute is URL and value contains protocol,
// we will check also value without protocol.
if ($attribute['type'] === 'url' || $attribute['type'] === 'uri') {
$protocolPos = strpos($attribute['value'], '://');
if ($protocolPos !== false) {
$parts[] = substr($attribute['value'], $protocolPos + 3);
}
}
}
foreach ($parts as $part) {