Fix unpublished pages status being overridden by publish dates

This commit is contained in:
Giuseppe Criscione 2019-04-07 16:33:48 +02:00
parent f444a7f4b6
commit 41dc517300

View File

@ -467,11 +467,11 @@ class Page extends AbstractPage
$this->published = $this->data['published'];
if ($this->has('publish-date')) {
$this->published = strtotime($this->get('publish-date')) < time();
$this->published = $this->published && strtotime($this->get('publish-date')) < time();
}
if ($this->has('unpublish-date')) {
$this->published = strtotime($this->get('unpublish-date')) > time();
$this->published = $this->published && strtotime($this->get('unpublish-date')) > time();
}
$this->routable = $this->data['routable'];