mirror of
https://github.com/standardebooks/web.git
synced 2025-07-12 17:42:29 -04:00
Rename Created
and Updated
in PHP code to EbookCreated
and EbookUpdated
to match the schema
This commit is contained in:
parent
ac7db8d375
commit
f605a4df60
6 changed files with 19 additions and 19 deletions
|
@ -10,7 +10,7 @@ use function Safe\mkdir;
|
|||
use function Safe\preg_replace;
|
||||
|
||||
function SortByUpdatedDesc(Ebook $a, Ebook $b): int{
|
||||
return $b->Updated <=> $a->Updated;
|
||||
return $b->EbookUpdated <=> $a->EbookUpdated;
|
||||
}
|
||||
|
||||
function SaveFeed(Feed $feed, bool $force, ?string $label = null, ?string $labelSort = null, DateTimeImmutable $now = null): void{
|
||||
|
@ -111,7 +111,7 @@ foreach(Library::GetEbooksFromFilesystem($webRoot) as $ebook){
|
|||
}
|
||||
|
||||
usort($allEbooks, 'SortByUpdatedDesc');
|
||||
usort($newestEbooks, function($a, $b){ return $b->Created <=> $a->Created; });
|
||||
usort($newestEbooks, function($a, $b){ return $b->EbookCreated <=> $a->EbookCreated; });
|
||||
$newestEbooks = array_slice($newestEbooks, 0, $ebooksPerNewestEbooksFeed);
|
||||
|
||||
// Create OPDS feeds.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue