mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Don't list authors more than once in sitemap
This commit is contained in:
parent
aeb2a0877e
commit
bddbfe3cfa
2 changed files with 3 additions and 3 deletions
|
@ -172,7 +172,7 @@ class Contributor{
|
|||
/**
|
||||
* @return array<Contributor>
|
||||
*/
|
||||
public static function GetAllByMarcRole(Enums\MarcRole $marcRole): array{
|
||||
return Db::Query('SELECT * from Contributors where MarcRole = ?', [$marcRole], Contributor::class);
|
||||
public static function GetDistinctByMarcRole(Enums\MarcRole $marcRole): array{
|
||||
return Db::Query('SELECT * from Contributors where MarcRole = ? group by UrlName', [$marcRole], Contributor::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
$ebooks = Ebook::GetAll();
|
||||
$authors = Contributor::GetAllByMarcRole(Enums\MarcRole::Author);
|
||||
$authors = Contributor::GetDistinctByMarcRole(Enums\MarcRole::Author);
|
||||
$collections = Collection::GetAll();
|
||||
|
||||
header("Content-Type: application/xml");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue