Skip to content

Commit

Permalink
Merge pull request #119 from FriendsOfREDAXO/christophboecker-patch-1
Browse files Browse the repository at this point in the history
Cronjob umbenennen
  • Loading branch information
alxndr-w authored Sep 14, 2024
2 parents a9c0227 + 6d1705c commit 86bcad1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
16 changes: 7 additions & 9 deletions fragments/neues/Article.json-ld.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace FriendsOfRedaxo\Neues;

use IntlDateFormatter;

/** @var \rex_fragment $this */
$entry = $this->getVar('entry');
/** @var Entry $entry */
Expand All @@ -12,15 +10,15 @@
{
"@context": "https://schema.org",
"@type": "Article",
"url": "<?= Neues::htmlEncode($entry->getUrl()); ?>",
"url": "<?= Neues::htmlEncode($entry->getUrl()) ?>",
"publisher":{
"@type":"Organization",
"name":"<?= Neues::htmlEncode(\rex::getserverName()); ?>",
"name":"<?= Neues::htmlEncode(\rex::getserverName()) ?>",
},
"headline": "<?= Neues::htmlEncode($entry->getName()); ?>",
"mainEntityOfPage": "<?= Neues::htmlEncode($entry->getUrl()); ?>",
"articleBody": "<?= Neues::htmlEncode($entry->getDescriptionAsPlaintext()); ?>",
"image": <?= json_encode(Neues::htmlEncode($entry->getImages())); ?>,
"datePublished": "<?= Neues::htmlEncode((new \DateTime($entry->getPublishDate()))->format(\DateTime::ATOM)); ?>"
"headline": "<?= Neues::htmlEncode($entry->getName()) ?>",
"mainEntityOfPage": "<?= Neues::htmlEncode($entry->getUrl()) ?>",
"articleBody": "<?= Neues::htmlEncode($entry->getDescriptionAsPlaintext()) ?>",
"image": <?= json_encode(Neues::htmlEncode($entry->getImages())) ?>,
"datePublished": "<?= Neues::htmlEncode((new \DateTime($entry->getPublishDate()))->format(\DateTime::ATOM)) ?>"
}
</script>
16 changes: 7 additions & 9 deletions fragments/neues/NewsArticle.json-ld.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace FriendsOfRedaxo\Neues;

use IntlDateFormatter;

/** @var \rex_fragment $this */
$entry = $this->getVar('entry');
/** @var Entry $entry */
Expand All @@ -12,15 +10,15 @@
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"url": "<?= Neues::htmlEncode($entry->getUrl()); ?>",
"url": "<?= Neues::htmlEncode($entry->getUrl()) ?>",
"publisher":{
"@type":"Organization",
"name":"<?= Neues::htmlEncode(\rex::getserverName()); ?>",
"name":"<?= Neues::htmlEncode(\rex::getserverName()) ?>",
},
"headline": "<?= Neues::htmlEncode($entry->getName()); ?>",
"mainEntityOfPage": "<?= Neues::htmlEncode($entry->getUrl()); ?>",
"articleBody": "<?= Neues::htmlEncode($entry->getDescriptionAsPlaintext()); ?>",
"image": <?= json_encode(Neues::htmlEncode($entry->getImages())); ?>,
"datePublished": "<?= Neues::htmlEncode((new \DateTime($entry->getPublishDate()))->format(\DateTime::ATOM)); ?>"
"headline": "<?= Neues::htmlEncode($entry->getName()) ?>",
"mainEntityOfPage": "<?= Neues::htmlEncode($entry->getUrl()) ?>",
"articleBody": "<?= Neues::htmlEncode($entry->getDescriptionAsPlaintext()) ?>",
"image": <?= json_encode(Neues::htmlEncode($entry->getImages())) ?>,
"datePublished": "<?= Neues::htmlEncode((new \DateTime($entry->getPublishDate()))->format(\DateTime::ATOM)) ?>"
}
</script>
4 changes: 2 additions & 2 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@
* -> rex_cronjob_neues_publish ändern in FriendsOfRedaxo\Neues\Cronjob\Publish.
*/
$sql->setTable(rex::getTable('cronjob'));
$sql->setValue('type', Publish::class);
$sql->setValue('type', 'FriendsOfRedaxo\\Neues\\Cronjob\\Publish');
$sql->setWhere('`type` = :class', [':class' => 'rex_cronjob_neues_publish']);
$sql->update();

/**
* Fehlenden CronJob eintragen.
*/
$sql->setTable(rex::getTable('cronjob'));
$sql->setWhere('`type` = :class', [':class' => Publish::class]);
$sql->setWhere('`type` = :class', [':class' => 'FriendsOfRedaxo\\Neues\\Cronjob\\Publish']);
$sql->select();

if (0 === $sql->getRows()) {
Expand Down

0 comments on commit 86bcad1

Please sign in to comment.