mirror of
https://github.com/getformwork/formwork.git
synced 2025-02-25 02:02:57 +01:00
Fix unpublished pages status being overridden by publish dates
This commit is contained in:
parent
f444a7f4b6
commit
41dc517300
@ -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'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user