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){ Exception !== null){ ?> -

Special public domain exception

+

Public domain status exception reason

Exception) ?> + Notes !== null){ ?> +

Special notes

+ Notes) ?> + +

Reviewer options

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:

+
+ Other details + +
Benefits->CanReviewArtwork){ ?>
Reviewer options diff --git a/www/artworks/post.php b/www/artworks/post.php index c0943355..2ef90dfd 100644 --- a/www/artworks/post.php +++ b/www/artworks/post.php @@ -42,6 +42,7 @@ try{ $artwork->MuseumUrl = HttpInput::Str(POST, 'artwork-museum-url', false); $artwork->MimeType = ImageMimeType::FromFile($_FILES['artwork-image']['tmp_name'] ?? null); $artwork->Exception = HttpInput::Str(POST, 'artwork-exception', false); + $artwork->Notes = HttpInput::Str(POST, 'artwork-notes', false); // Only approved reviewers can set the status to anything but unverified when uploading if($artwork->Status != COVER_ARTWORK_STATUS_UNVERIFIED && !$GLOBALS['User']->Benefits->CanReviewArtwork){ @@ -86,6 +87,7 @@ try{ $artwork->ArtworkPageUrl = HttpInput::Str(POST, 'artwork-artwork-page-url', false) ?? $artwork->ArtworkPageUrl; $artwork->MuseumUrl = HttpInput::Str(POST, 'artwork-museum-url', false) ?? $artwork->MuseumUrl; $artwork->Exception = HttpInput::Str(POST, 'artwork-exception', false) ?? $artwork->Exception; + $artwork->Notes = HttpInput::Str(POST, 'artwork-notes', false) ?? $artwork->Notes; $artwork->ReviewerUserId = $GLOBALS['User']->UserId;