mirror of
https://github.com/standardebooks/web.git
synced 2025-07-08 15:50:29 -04:00
Don't allow unapproved museums when uploading artwork
This commit is contained in:
parent
40d8700ae9
commit
2eebf33254
1 changed files with 8 additions and 0 deletions
|
@ -321,6 +321,14 @@ class Artwork extends PropertiesBase{
|
||||||
if($this->MuseumUrl == '' || filter_var($this->MuseumUrl, FILTER_VALIDATE_URL) === false){
|
if($this->MuseumUrl == '' || filter_var($this->MuseumUrl, FILTER_VALIDATE_URL) === false){
|
||||||
$error->Add(new Exceptions\InvalidMuseumUrlException());
|
$error->Add(new Exceptions\InvalidMuseumUrlException());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Don't allow unapproved museums
|
||||||
|
try{
|
||||||
|
Museum::GetByUrl($this->MuseumUrl);
|
||||||
|
}
|
||||||
|
catch(Exceptions\MuseumNotFoundException $ex){
|
||||||
|
$error->Add($ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->PublicationYearPageUrl !== null){
|
if($this->PublicationYearPageUrl !== null){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue