diff --git a/www/artworks/edit.php b/www/artworks/edit.php
index d99efa7f..aaa33a81 100644
--- a/www/artworks/edit.php
+++ b/www/artworks/edit.php
@@ -3,6 +3,7 @@ use function Safe\session_unset;
session_start();
+/** @var ?\Exception $exception */
$exception = $_SESSION['exception'] ?? null;
/** @var ?Artwork $artwork */
$artwork = $_SESSION['artwork'] ?? null;
diff --git a/www/artworks/get.php b/www/artworks/get.php
index b34c6af3..806eec46 100644
--- a/www/artworks/get.php
+++ b/www/artworks/get.php
@@ -4,6 +4,7 @@ use function Safe\session_unset;
session_start();
$saved = HttpInput::Bool(SESSION, 'artwork-saved') ?? false;
+/** @var ?\Exception $exception */
$exception = $_SESSION['exception'] ?? null;
try{
@@ -33,6 +34,7 @@ try{
// because if the new status is 'approved' then it will hide the status form entirely,
// which will be confusing.
$oldStatus = $artwork->Status;
+ /** @var Artwork $artwork */
$artwork = $_SESSION['artwork'] ?? $artwork;
$artwork->Status = $oldStatus;
@@ -75,7 +77,7 @@ catch(Exceptions\InvalidPermissionsException){
Artist |
- = Formatter::EscapeHtml($artwork->Artist->Name) ?> if(sizeof($artwork->Artist->AlternateNames) > 0){ ?> (A.K.A. = implode(', ', array_map('Formatter::EscapeHtml', $artwork->Artist->AlternateNames)) ?>) } ?> if($artwork->Artist->DeathYear !== null){ ?> (d. = $artwork->Artist->DeathYear ?>) } ?> if($isAdminView){ ?> (#= $artwork->Artist->ArtistId ?>) } ?>
+ = Formatter::EscapeHtml($artwork->Artist->Name) ?> if(sizeof($artwork->Artist->AlternateNames ?? []) > 0){ ?> (A.K.A. = implode(', ', array_map('Formatter::EscapeHtml', $artwork->Artist->AlternateNames)) ?>) } ?> if($artwork->Artist->DeathYear !== null){ ?> (d. = $artwork->Artist->DeathYear ?>) } ?> if($isAdminView){ ?> (#= $artwork->Artist->ArtistId ?>) } ?>
|
@@ -126,7 +128,7 @@ catch(Exceptions\InvalidPermissionsException){
if($artwork->PublicationYear !== null){ ?>
Page scans
- - Year book was published: if($artwork->PublicationYear !== null){ ?>= $artwork->PublicationYear ?> }else{ ?>Not provided } ?>
+ - Year book was published: = $artwork->PublicationYear ?>
- Page scan of book publication year: if($artwork->PublicationYearPageUrl !== null){ ?>Link }else{ ?>Not provided } ?>
- Page scan of rights statement: if($artwork->CopyrightPageUrl !== null){ ?>Link }else{ ?>Not provided } ?>
- Page scan of artwork: if($artwork->ArtworkPageUrl !== null){ ?>Link }else{ ?>Not provided } ?>
@@ -143,20 +145,20 @@ catch(Exceptions\InvalidPermissionsException){
= Formatter::MarkdownToHtml($artwork->Notes) ?>
} ?>
- if($artwork->CanBeEditedBy($GLOBALS['User'] ?? null)){ ?>
+ if($artwork->CanBeEditedBy($GLOBALS['User'])){ ?>
Edit artwork
The editor or submitter may edit this artwork before it’s approved. Once it’s approved, it can no longer be edited.
Edit this artwork.
} ?>
- if($artwork->CanStatusBeChangedBy($GLOBALS['User'] ?? null) || $artwork->CanEbookUrlBeChangedBy($GLOBALS['User'] ?? null)){ ?>
+ if($artwork->CanStatusBeChangedBy($GLOBALS['User']) || $artwork->CanEbookUrlBeChangedBy($GLOBALS['User'])){ ?>
Editor options
- if($artwork->CanStatusBeChangedBy($GLOBALS['User'] ?? null)){ ?>
+ if($artwork->CanStatusBeChangedBy($GLOBALS['User'])){ ?>
Review the metadata and PD proof for this artwork submission. Approve to make it available for future producers. Once an artwork is approved, it can no longer be edited.
} ?>