diff --git a/config/sql/se/Artworks.sql b/config/sql/se/Artworks.sql index 5c085633..efd2d04d 100644 --- a/config/sql/se/Artworks.sql +++ b/config/sql/se/Artworks.sql @@ -19,6 +19,7 @@ CREATE TABLE `Artworks` ( `EbookWwwFilesystemPath` varchar(255) NULL, `MimeType` varchar(64) NOT NULL, `Exception` TEXT NULL DEFAULT NULL, + `Notes` TEXT NULL DEFAULT NULL PRIMARY KEY (`ArtworkId`), KEY `index1` (`Status`), KEY `index2` (`UrlName`) diff --git a/lib/Artwork.php b/lib/Artwork.php index c0a92272..dd95c7cc 100644 --- a/lib/Artwork.php +++ b/lib/Artwork.php @@ -46,6 +46,7 @@ class Artwork extends PropertiesBase{ public ?string $ArtworkPageUrl = null; public ?bool $IsPublishedInUs = null; public ?string $Exception = null; + public ?string $Notes = null; protected ?string $_UrlName = null; protected ?string $_Url = null; protected $_Tags = null; @@ -268,6 +269,10 @@ class Artwork extends PropertiesBase{ $this->Exception = null; } + if($this->Notes !== null && trim($this->Notes) == ''){ + $this->Notes = null; + } + if($this->Name === null || $this->Name == ''){ $error->Add(new Exceptions\ArtworkNameRequiredException()); } @@ -564,7 +569,7 @@ class Artwork extends PropertiesBase{ INSERT into Artworks (ArtistId, Name, UrlName, CompletedYear, CompletedYearIsCirca, Created, Status, SubmitterUserId, ReviewerUserId, MuseumUrl, PublicationYear, PublicationYearPageUrl, CopyrightPageUrl, ArtworkPageUrl, IsPublishedInUs, - EbookWwwFilesystemPath, MimeType, Exception) + EbookWwwFilesystemPath, MimeType, Exception, Notes) values (?, ?, ?, @@ -582,10 +587,11 @@ class Artwork extends PropertiesBase{ ?, ?, ?, + ?, ?) ', [$this->Artist->ArtistId, $this->Name, $this->UrlName, $this->CompletedYear, $this->CompletedYearIsCirca, $this->Created, $this->Status, $this->SubmitterUserId, $this->ReviewerUserId, $this->MuseumUrl, $this->PublicationYear, $this->PublicationYearPageUrl, - $this->CopyrightPageUrl, $this->ArtworkPageUrl, $this->IsPublishedInUs, $this->EbookWwwFilesystemPath, $this->MimeType->value ?? null, $this->Exception] + $this->CopyrightPageUrl, $this->ArtworkPageUrl, $this->IsPublishedInUs, $this->EbookWwwFilesystemPath, $this->MimeType->value ?? null, $this->Exception, $this->Notes] ); $this->ArtworkId = Db::GetLastInsertedId(); @@ -640,12 +646,13 @@ class Artwork extends PropertiesBase{ IsPublishedInUs = ?, EbookWwwFilesystemPath = ?, MimeType = ?, - Exception = ? + Exception = ?, + Notes = ? where ArtworkId = ? ', [$this->Artist->ArtistId, $this->Name, $this->UrlName, $this->CompletedYear, $this->CompletedYearIsCirca, $this->Created, $this->Status, $this->SubmitterUserId, $this->ReviewerUserId, $this->MuseumUrl, $this->PublicationYear, $this->PublicationYearPageUrl, - $this->CopyrightPageUrl, $this->ArtworkPageUrl, $this->IsPublishedInUs, $this->EbookWwwFilesystemPath, $this->MimeType->value ?? null, $this->Exception, + $this->CopyrightPageUrl, $this->ArtworkPageUrl, $this->IsPublishedInUs, $this->EbookWwwFilesystemPath, $this->MimeType->value ?? null, $this->Exception, $this->Notes, $this->ArtworkId] ); } diff --git a/www/artworks/get.php b/www/artworks/get.php index 035ae50f..066b2288 100644 --- a/www/artworks/get.php +++ b/www/artworks/get.php @@ -119,10 +119,15 @@ catch(Exceptions\ArtworkNotFoundException){ } ?> if($artwork->Exception !== null){ ?> -
Review the metadata and PD proof for this artwork submission. Approve to make it available for future producers.
diff --git a/www/artworks/new.php b/www/artworks/new.php index 53216dfb..43efa742 100644 --- a/www/artworks/new.php +++ b/www/artworks/new.php @@ -217,12 +217,20 @@ catch(Exceptions\InvalidPermissionsException){or a reason for a special exception:
+ if($GLOBALS['User']->Benefits->CanReviewArtwork){ ?>