mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 04:16:38 -04:00
Add CanEditEbooks benefit and clean up some PHPStan errors
This commit is contained in:
parent
23b5c8ef31
commit
1a742baa51
10 changed files with 75 additions and 14 deletions
|
@ -55,14 +55,21 @@ class AtomFeed extends Feed{
|
|||
foreach($this->Entries as $entry){
|
||||
$obj = new StdClass();
|
||||
if($entry instanceof Ebook){
|
||||
$obj->Updated = $entry->EbookUpdated->format(Enums\DateTimeFormat::Iso->value);
|
||||
$obj->Id = SITE_URL . $entry->Url;
|
||||
if($entry->EbookUpdated !== null){
|
||||
$obj->Updated = $entry->EbookUpdated->format(Enums\DateTimeFormat::Iso->value);
|
||||
$obj->Id = SITE_URL . $entry->Url;
|
||||
}
|
||||
}
|
||||
else{
|
||||
$obj->Updated = $entry->Updated->format(Enums\DateTimeFormat::Iso->value);
|
||||
$obj->Id = $entry->Id;
|
||||
if($entry->Updated !== null){
|
||||
$obj->Updated = $entry->Updated->format(Enums\DateTimeFormat::Iso->value);
|
||||
$obj->Id = $entry->Id;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($obj->Id)){
|
||||
$currentEntries[] = $obj;
|
||||
}
|
||||
$currentEntries[] = $obj;
|
||||
}
|
||||
|
||||
$oldEntries = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue