diff --git a/lib/Contributor.php b/lib/Contributor.php index 220bd129..18ba65c0 100644 --- a/lib/Contributor.php +++ b/lib/Contributor.php @@ -44,23 +44,27 @@ class Contributor{ /** * @return array */ - public static function GetAllAuthorNames(): array{ + public static function GetAllByMarcRole(Enums\MarcRole $marcRole): array{ return Db::Query(' - SELECT DISTINCT Name + SELECT + * from Contributors - where MarcRole = "aut" - order by Name asc', [], Contributor::class); + where MarcRole = ? + and SortName is not null + group by SortName + order by SortName asc', [$marcRole], Contributor::class); } /** - * @return array + * @return array */ - public static function GetAllTranslatorNames(): array{ + public static function GetAllNamesByMarcRole(Enums\MarcRole $marcRole): array{ return Db::Query(' - SELECT DISTINCT Name + SELECT + distinct Name from Contributors - where MarcRole = "trl" - order by Name asc', [], Contributor::class); + where MarcRole = ? + order by Name asc', [$marcRole]); } /** diff --git a/templates/EbookPlaceholderForm.php b/templates/EbookPlaceholderForm.php index 9ea69ca1..1315596e 100644 --- a/templates/EbookPlaceholderForm.php +++ b/templates/EbookPlaceholderForm.php @@ -11,7 +11,7 @@ $showProjectForm ??= true;