From 47973970b60f95c7d292448d923f5cd7e584c5f1 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sat, 13 Jan 2024 14:51:34 -0600 Subject: [PATCH] Remove webumenia museum URL normalization --- lib/Museum.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/Museum.php b/lib/Museum.php index a789c253..59f2d9fd 100644 --- a/lib/Museum.php +++ b/lib/Museum.php @@ -506,22 +506,6 @@ class Museum extends PropertiesBase{ return $outputUrl; } - elseif(preg_match('/\bwebumenia\.sk$/ius', $parsedUrl['host'])){ - // All we need is the int object ID, the last slug is SEO - $exampleUrl = 'https://www.webumenia.sk/en/dielo/SVK:SNG.O_85'; - - if($parsedUrl['host'] != 'www.webumenia.sk'){ - throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl); - } - - if(!preg_match('|^/en/dielo/[^/]+?$|ius', $parsedUrl['path'])){ - throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl); - } - - $outputUrl = 'https://' . $parsedUrl['host'] . $parsedUrl['path']; - - return $outputUrl; - } elseif(preg_match('/\bdigitaltmuseum\.no$/ius', $parsedUrl['host'])){ $exampleUrl = 'https://digitaltmuseum.no/021048495118/fra-saxegardsgaten-maleri'; @@ -552,6 +536,22 @@ class Museum extends PropertiesBase{ return $outputUrl; } + // elseif(preg_match('/\bwebumenia\.sk$/ius', $parsedUrl['host'])){ + // // All we need is the int object ID, the last slug is SEO + // $exampleUrl = 'https://www.webumenia.sk/en/dielo/SVK:SNG.O_85'; + + // if($parsedUrl['host'] != 'www.webumenia.sk'){ + // throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl); + // } + + // if(!preg_match('|^/en/dielo/[^/]+?$|ius', $parsedUrl['path'])){ + // throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl); + // } + + // $outputUrl = 'https://' . $parsedUrl['host'] . $parsedUrl['path']; + + // return $outputUrl; + // } return $outputUrl; }