Add KMSK as approved museum in artwork form

This commit is contained in:
Alex Cabal 2024-09-22 12:49:54 -05:00
parent 7bffbd09bd
commit f6204c1c02

View file

@ -562,6 +562,21 @@ class Museum{
return $outputUrl; return $outputUrl;
} }
elseif(preg_match('/\bkmska\.be$/', $parsedUrl['host'])){
$exampleUrl = 'https://kmska.be/en/masterpiece/restaurant-mille-colonnes-amsterdam';
if($parsedUrl['host'] != 'kmska.be'){
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
}
if(!preg_match('|^/en/masterpiece/[^/]+$|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';