mirror of
https://github.com/standardebooks/web.git
synced 2025-07-10 00:30:28 -04:00
Refactor functions out of Library
This commit is contained in:
parent
1449148989
commit
b7b63a4be5
24 changed files with 419 additions and 444 deletions
|
@ -38,7 +38,7 @@ function SaveFeed(Feed $feed, bool $force, ?string $label = null, ?string $label
|
|||
* @param array<string, array<Ebook>> $ebooks
|
||||
*/
|
||||
function CreateOpdsCollectionFeed(string $name, string $url, string $description, array $collections, array $ebooks, DateTimeImmutable $now, string $webRoot, OpdsNavigationFeed $opdsRoot, bool $force): void{
|
||||
$collator = Collator::create('en_US'); // Used for sorting letters with diacritics like in author names
|
||||
$collator = Collator::create('en_US'); // Used for sorting letters with diacritics, like in author names.
|
||||
|
||||
if($collator === null){
|
||||
return;
|
||||
|
@ -97,7 +97,7 @@ foreach($dirs as $dir){
|
|||
}
|
||||
|
||||
// Iterate over all ebooks to build the various feeds.
|
||||
foreach(Library::GetEbooks() as $ebook){
|
||||
foreach(Ebook::GetAll() as $ebook){
|
||||
$allEbooks[] = $ebook;
|
||||
$newestEbooks[] = $ebook;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue