Skip to content

Commit

Permalink
Merge pull request #136 from thorol/main
Browse files Browse the repository at this point in the history
Cronjob publish sollte ebenfalls auf die Uhrzeiten schauen.
  • Loading branch information
alxndr-w authored Feb 3, 2025
2 parents 07837f6 + df0683d commit 41ed3f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cronjob/Publish.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Publish extends rex_cronjob
public function execute()
{
/* Collection von Neues-Einträgen, die noch nicht veröffentlicht sind, aber es sein sollten. (geplant) */
$neues_entry_to_publish = Entry::query()->where('status', Entry::PLANNED)->where('publishdate', date('Y-m-d'), '<')->find();
$neues_entry_to_publish = Entry::query()->where('status', Entry::PLANNED)->where('publishdate', date('Y-m-d H:i:s'), '<')->find();
$neues_entry_to_publish->setValue('status', Entry::ONLINE);
if (!$neues_entry_to_publish->save()) {
$this->setMessage(sprintf(rex_i18n::msg('neues_entry_publish_error'), count($neues_entry_to_publish)));
Expand Down

0 comments on commit 41ed3f5

Please sign in to comment.