mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 10:31:59 -04:00
Update nga.gov URL structure in artwork submission page
This commit is contained in:
parent
e3ee949d94
commit
cd4be0a3e3
1 changed files with 2 additions and 2 deletions
|
@ -331,13 +331,13 @@ class Museum{
|
||||||
return $outputUrl;
|
return $outputUrl;
|
||||||
}
|
}
|
||||||
elseif(preg_match('/\bnga\.gov$/ius', $parsedUrl['host'])){
|
elseif(preg_match('/\bnga\.gov$/ius', $parsedUrl['host'])){
|
||||||
$exampleUrl = 'https://www.nga.gov/collection/art-object-page.46522.html';
|
$exampleUrl = 'https://www.nga.gov/artworks/102195-fallen-tree';
|
||||||
|
|
||||||
if($parsedUrl['host'] != 'www.nga.gov'){
|
if($parsedUrl['host'] != 'www.nga.gov'){
|
||||||
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
|
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!preg_match('|^/collection/art-object-page\.[^/]+\.html$|ius', $parsedUrl['path'])){
|
if(!preg_match('|^/artworks/[^/]+$|ius', $parsedUrl['path'])){
|
||||||
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
|
throw new Exceptions\InvalidMuseumUrlException($url, $exampleUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue