Compare commits

..

2 Commits

Author SHA1 Message Date
Steve Boyd
57bba2336a
Merge 89c36475e4 into cd1b9ed9f2 2024-10-02 05:51:26 +00:00
Steve Boyd
89c36475e4 FIX Set empty date to null 2024-10-02 18:50:47 +13:00

View File

@ -194,7 +194,7 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
*
* @param SiteTree $page
*
* @return null|DBDate
* @return bool|DBDate
*/
public function getReviewDate(SiteTree $page = null)
{
@ -209,11 +209,11 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
$options = $this->owner->getOptions();
if (!$options) {
return null;
return false;
}
if (!$options->ReviewPeriodDays) {
return null;
return false;
}
// Failover to check on ReviewPeriodDays + LastEdited
@ -509,9 +509,6 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
DBDatetime::now()->getTimestamp()
);
$x=DBDate::create()->setValue($nextDateTimestamp)->Format(DBDate::ISO_DATE);
;
$this->owner->NextReviewDate = DBDate::create()->setValue($nextDateTimestamp)->Format(DBDate::ISO_DATE);
$this->owner->write();
}