mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 15:20:32 -04:00
Artwork system: More options for reviewers submitting new artwork
This commit is contained in:
parent
8e955bf357
commit
017baef7d3
6 changed files with 66 additions and 37 deletions
|
@ -309,6 +309,15 @@ class Artwork extends PropertiesBase{
|
|||
$error->Add(new Exceptions\InvalidMimeTypeException());
|
||||
}
|
||||
|
||||
// Check the ebook www filesystem path.
|
||||
// We don't check if it exists, because the book might not be published yet.
|
||||
// But we do a basic check that the string includes one _. It might not include a dash, for example anonymous_poetry
|
||||
if($this->EbookWwwFilesystemPath !== null){
|
||||
if(mb_stripos($this->EbookWwwFilesystemPath, '_') === false){
|
||||
$error->Add(new Exceptions\InvalidEbookException('Invalid ebook. Expected file system slug like “c-s-lewis_poetry”.'));
|
||||
}
|
||||
}
|
||||
|
||||
// Check for existing Artwork objects with the same URL but different Artwork IDs.
|
||||
try{
|
||||
$existingArtwork = Artwork::GetByUrl($this->Artist->UrlName, $this->UrlName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue