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 @@
+
+enum ArtworkSort: string{
+ case CreatedNewest = 'created-newest';
+ case ArtistAlpha = 'artist-alpha';
+ case CompletedNewest = 'completed-newest';
+}
diff --git a/lib/Constants.php b/lib/Constants.php
index a3c2104e..9cec01e0 100644
--- a/lib/Constants.php
+++ b/lib/Constants.php
@@ -44,9 +44,6 @@ const ARTWORK_MAX_STRING_LENGTH = 250;
const ARTWORK_MAX_TAGS = 15;
const ARTWORK_IMAGE_MINIMUM_WIDTH = 300;
const ARTWORK_IMAGE_MINIMUM_HEIGHT = 300;
-const SORT_COVER_ARTWORK_CREATED_NEWEST = 'created-newest';
-const SORT_COVER_ARTIST_ALPHA = 'artist-alpha';
-const SORT_COVER_ARTWORK_COMPLETED_NEWEST = 'completed-newest';
const CAPTCHA_IMAGE_HEIGHT = 72;
const CAPTCHA_IMAGE_WIDTH = 230;
diff --git a/lib/Library.php b/lib/Library.php
index 99c099f3..6b0f464c 100644
--- a/lib/Library.php
+++ b/lib/Library.php
@@ -210,10 +210,10 @@ class Library{
}
$orderBy = 'art.Created desc';
- if($sort == SORT_COVER_ARTIST_ALPHA){
+ if($sort == ArtworkSort::ArtistAlpha->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