mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 23:00:28 -04:00
Change 'modified' property to 'updated' for consistency
This commit is contained in:
parent
32206f3cd7
commit
c2cf6ef455
6 changed files with 7 additions and 7 deletions
|
@ -47,7 +47,7 @@ class AtomFeed extends Feed{
|
||||||
foreach($this->Entries as $entry){
|
foreach($this->Entries as $entry){
|
||||||
$obj = new StdClass();
|
$obj = new StdClass();
|
||||||
if(is_a($entry, 'Ebook')){
|
if(is_a($entry, 'Ebook')){
|
||||||
$obj->Updated = $entry->Modified->format('Y-m-d\TH:i:s\Z');
|
$obj->Updated = $entry->Updated->format('Y-m-d\TH:i:s\Z');
|
||||||
$obj->Id = SITE_URL . $entry->Url;
|
$obj->Id = SITE_URL . $entry->Url;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
|
@ -54,7 +54,7 @@ class Ebook{
|
||||||
public $ContributorsHtml;
|
public $ContributorsHtml;
|
||||||
public $TitleWithCreditsHtml = '';
|
public $TitleWithCreditsHtml = '';
|
||||||
public $Created;
|
public $Created;
|
||||||
public $Modified;
|
public $Updated;
|
||||||
public $TextUrl;
|
public $TextUrl;
|
||||||
public $TextSinglePageUrl;
|
public $TextSinglePageUrl;
|
||||||
public $TocEntries = null; // A list of non-Roman ToC entries ONLY IF the work has the 'se:is-a-collection' metadata element, null otherwise
|
public $TocEntries = null; // A list of non-Roman ToC entries ONLY IF the work has the 'se:is-a-collection' metadata element, null otherwise
|
||||||
|
@ -191,7 +191,7 @@ class Ebook{
|
||||||
|
|
||||||
$modifiedDate = $xml->xpath('/package/metadata/meta[@property="dcterms:modified"]');
|
$modifiedDate = $xml->xpath('/package/metadata/meta[@property="dcterms:modified"]');
|
||||||
if($modifiedDate !== false && sizeof($modifiedDate) > 0){
|
if($modifiedDate !== false && sizeof($modifiedDate) > 0){
|
||||||
$this->Modified = new DateTime((string)$modifiedDate[0]);
|
$this->Updated = new DateTime((string)$modifiedDate[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get SE tags
|
// Get SE tags
|
||||||
|
|
|
@ -57,7 +57,7 @@ foreach($contentFiles as $path){
|
||||||
|
|
||||||
$ebook = new Ebook($ebookWwwFilesystemPath);
|
$ebook = new Ebook($ebookWwwFilesystemPath);
|
||||||
|
|
||||||
$allEbooks[$ebook->Modified->format('Y-m-d\TH:i:s\Z') . ' ' . $ebook->Identifier] = $ebook;
|
$allEbooks[$ebook->Updated->format('Y-m-d\TH:i:s\Z') . ' ' . $ebook->Identifier] = $ebook;
|
||||||
$newestEbooks[$ebook->Created->format('Y-m-d\TH:i:s\Z') . ' ' . $ebook->Identifier] = $ebook;
|
$newestEbooks[$ebook->Created->format('Y-m-d\TH:i:s\Z') . ' ' . $ebook->Identifier] = $ebook;
|
||||||
|
|
||||||
foreach($ebook->Tags as $tag){
|
foreach($ebook->Tags as $tag){
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</author>
|
</author>
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
|
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
|
||||||
<updated><?= $entry->Modified->format('Y-m-d\TH:i:s\Z') ?></updated>
|
<updated><?= $entry->Updated->format('Y-m-d\TH:i:s\Z') ?></updated>
|
||||||
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>
|
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>
|
||||||
<summary type="text"><?= Formatter::ToPlainXmlText($entry->Description) ?></summary>
|
<summary type="text"><?= Formatter::ToPlainXmlText($entry->Description) ?></summary>
|
||||||
<content type="html"><?= Formatter::ToPlainXmlText($entry->LongDescription) ?></content>
|
<content type="html"><?= Formatter::ToPlainXmlText($entry->LongDescription) ?></content>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<? } ?>
|
<? } ?>
|
||||||
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
|
<published><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></published>
|
||||||
<dc:issued><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></dc:issued>
|
<dc:issued><?= $entry->Created->format('Y-m-d\TH:i:s\Z') ?></dc:issued>
|
||||||
<updated><?= $entry->Modified->format('Y-m-d\TH:i:s\Z') ?></updated>
|
<updated><?= $entry->Updated->format('Y-m-d\TH:i:s\Z') ?></updated>
|
||||||
<dc:language><?= Formatter::ToPlainXmlText($entry->Language) ?></dc:language>
|
<dc:language><?= Formatter::ToPlainXmlText($entry->Language) ?></dc:language>
|
||||||
<dc:publisher>Standard Ebooks</dc:publisher>
|
<dc:publisher>Standard Ebooks</dc:publisher>
|
||||||
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>
|
<rights>Public domain in the United States. Users located outside of the United States must check their local laws before using this ebook. Original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication.</rights>
|
||||||
|
|
|
@ -191,7 +191,7 @@ catch(Exceptions\InvalidEbookException $ex){
|
||||||
<meta property="schema:thumbnailUrl" content="<?= Formatter::ToPlainText(SITE_URL . $ebook->Url . '/downloads/cover-thumbnail.jpg') ?>"/>
|
<meta property="schema:thumbnailUrl" content="<?= Formatter::ToPlainText(SITE_URL . $ebook->Url . '/downloads/cover-thumbnail.jpg') ?>"/>
|
||||||
<meta property="schema:inLanguage" content="<?= Formatter::ToPlainText($ebook->Language) ?>"/>
|
<meta property="schema:inLanguage" content="<?= Formatter::ToPlainText($ebook->Language) ?>"/>
|
||||||
<meta property="schema:datePublished" content="<?= Formatter::ToPlainText($ebook->Created->format('Y-m-d')) ?>"/>
|
<meta property="schema:datePublished" content="<?= Formatter::ToPlainText($ebook->Created->format('Y-m-d')) ?>"/>
|
||||||
<meta property="schema:dateModified" content="<?= Formatter::ToPlainText($ebook->Modified->format('Y-m-d')) ?>"/>
|
<meta property="schema:dateModified" content="<?= Formatter::ToPlainText($ebook->Updated->format('Y-m-d')) ?>"/>
|
||||||
<div property="schema:potentialAction" typeof="http://schema.org/ReadAction">
|
<div property="schema:potentialAction" typeof="http://schema.org/ReadAction">
|
||||||
<meta property="schema:actionStatus" content="http://schema.org/PotentialActionStatus"/>
|
<meta property="schema:actionStatus" content="http://schema.org/PotentialActionStatus"/>
|
||||||
<div property="schema:target" typeof="schema:EntryPoint">
|
<div property="schema:target" typeof="schema:EntryPoint">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue