mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 15:05:47 +00:00
Compare commits
2 Commits
57bba2336a
...
aee13af0c2
Author | SHA1 | Date | |
---|---|---|---|
|
aee13af0c2 | ||
|
3ed6eb0971 |
@ -194,7 +194,7 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
|
|||||||
*
|
*
|
||||||
* @param SiteTree $page
|
* @param SiteTree $page
|
||||||
*
|
*
|
||||||
* @return bool|DBDate
|
* @return null|DBDate
|
||||||
*/
|
*/
|
||||||
public function getReviewDate(SiteTree $page = null)
|
public function getReviewDate(SiteTree $page = null)
|
||||||
{
|
{
|
||||||
@ -209,11 +209,11 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
|
|||||||
$options = $this->owner->getOptions();
|
$options = $this->owner->getOptions();
|
||||||
|
|
||||||
if (!$options) {
|
if (!$options) {
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$options->ReviewPeriodDays) {
|
if (!$options->ReviewPeriodDays) {
|
||||||
return false;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Failover to check on ReviewPeriodDays + LastEdited
|
// Failover to check on ReviewPeriodDays + LastEdited
|
||||||
@ -509,6 +509,9 @@ class SiteTreeContentReview extends Extension implements PermissionProvider
|
|||||||
DBDatetime::now()->getTimestamp()
|
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->NextReviewDate = DBDate::create()->setValue($nextDateTimestamp)->Format(DBDate::ISO_DATE);
|
||||||
$this->owner->write();
|
$this->owner->write();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user