Add Lenbachhaus as an approved museum

This commit is contained in:
Alex Cabal 2024-06-03 13:23:30 -05:00
parent c51fe594bf
commit a54cca24b6

View file

@ -547,6 +547,21 @@ class Museum{
return $outputUrl; return $outputUrl;
} }
elseif(preg_match('/\blenbachhaus\.de$/', $parsedUrl['host'])){
$exampleUrl = 'https://www.lenbachhaus.de/en/digital/collection-online/detail/hymnus-an-michelangelo-30036437';
if($parsedUrl['host'] != 'www.lenbachhaus.de'){
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
}
if(!preg_match('|^/en/digital/collection-online/detail/[^/]+$|ius', $parsedUrl['path'])){
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
}
$outputUrl = 'https://' . $parsedUrl['host'] . $parsedUrl['path'];
return $outputUrl;
}
// elseif(preg_match('/\bwebumenia\.sk$/ius', $parsedUrl['host'])){ // elseif(preg_match('/\bwebumenia\.sk$/ius', $parsedUrl['host'])){
// // All we need is the int object ID, the last slug is SEO // // All we need is the int object ID, the last slug is SEO
// $exampleUrl = 'https://www.webumenia.sk/en/dielo/SVK:SNG.O_85'; // $exampleUrl = 'https://www.webumenia.sk/en/dielo/SVK:SNG.O_85';