From 004a4a27c31fe3a59901005bcfc72013d45020e9 Mon Sep 17 00:00:00 2001 From: Mike Colagrosso Date: Mon, 29 Jan 2024 23:20:29 -0700 Subject: [PATCH] Convert SORT_COVER_ constants to an enum --- lib/ArtworkSort.php | 6 ++++++ lib/Constants.php | 3 --- lib/Library.php | 4 ++-- www/artworks/index.php | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 lib/ArtworkSort.php diff --git a/lib/ArtworkSort.php b/lib/ArtworkSort.php new file mode 100644 index 00000000..57374b8b --- /dev/null +++ b/lib/ArtworkSort.php @@ -0,0 +1,6 @@ +value){ $orderBy = 'a.Name'; } - elseif($sort == SORT_COVER_ARTWORK_COMPLETED_NEWEST){ + elseif($sort == ArtworkSort::CompletedNewest->value){ $orderBy = 'art.CompletedYear desc'; } diff --git a/www/artworks/index.php b/www/artworks/index.php index 465a54c1..ac99256c 100644 --- a/www/artworks/index.php +++ b/www/artworks/index.php @@ -142,9 +142,9 @@ catch(Exceptions\PageOutOfBoundsException){ Sort