mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
Compare commits
2 Commits
aee13af0c2
...
57bba2336a
Author | SHA1 | Date | |
---|---|---|---|
|
57bba2336a | ||
|
89c36475e4 |
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user