Convert SORT_COVER_ constants to an enum

This commit is contained in:
Mike Colagrosso 2024-01-29 23:20:29 -07:00 committed by Alex Cabal
parent 09b4385100
commit 004a4a27c3
4 changed files with 11 additions and 8 deletions

View file

@ -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';
}