diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-25 17:53:44 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-25 17:53:44 +0200 |
commit | 0efeef6b6693d62675ec8a45e73c71f69e0a0362 (patch) | |
tree | 4b86b3bd62217fc4c60e2827e30a45209ce82605 /app/class/Page.php | |
parent | bd16dc7c6fc630a6b59ca3b041dde146ab50c72b (diff) | |
parent | 385b3f4adf86606e03941171c136d8f2eb2b35c2 (diff) | |
download | wcms-0efeef6b6693d62675ec8a45e73c71f69e0a0362.tar.gz wcms-0efeef6b6693d62675ec8a45e73c71f69e0a0362.zip |
Merge branch master with implement-exception
Diffstat (limited to 'app/class/Page.php')
-rw-r--r-- | app/class/Page.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/app/class/Page.php b/app/class/Page.php index 760521b..da149f7 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -53,8 +53,7 @@ class Page extends Dbitem public const TABS = ['main', 'css', 'header', 'body', 'nav', 'aside', 'footer', 'javascript']; public const VAR_DATE = ['date', 'datecreation', 'datemodif', 'daterender']; - - + // _____________________________________________________ F U N ____________________________________________________ @@ -71,7 +70,7 @@ class Page extends Dbitem public function reset() { - $now = new DateTimeImmutable(null, timezone_open("Europe/Paris")); + $now = new DateTimeImmutable("now", timezone_open("Europe/Paris")); $this->settitle($this->id()); $this->setdescription(''); @@ -460,7 +459,7 @@ class Page extends Dbitem if ($datecreation instanceof DateTimeImmutable) { $this->datecreation = $datecreation; } elseif ($datecreation === true) { - $this->datecreation = new DateTimeImmutable(null, timezone_open("Europe/Paris")); + $this->datecreation = new DateTimeImmutable("now", timezone_open("Europe/Paris")); } else { $this->datecreation = DateTimeImmutable::createFromFormat( DateTime::ISO8601, @@ -508,7 +507,7 @@ class Page extends Dbitem public function setjavascript($javascript) { - if (strlen($javascript < self::LENTEXT && is_string($javascript))) { + if (strlen($javascript) < self::LENTEXT && is_string($javascript)) { $this->javascript = $javascript; } } @@ -516,14 +515,14 @@ class Page extends Dbitem public function setbody($body) { - if (strlen($body < self::LENTEXT && is_string($body))) { + if (strlen($body) < self::LENTEXT && is_string($body)) { $this->body = $body; } } public function setheader($header) { - if (strlen($header < self::LENTEXT && is_string($header))) { + if (strlen($header) < self::LENTEXT && is_string($header)) { $this->header = $header; } } @@ -756,7 +755,7 @@ class Page extends Dbitem public function updateedited() { - $now = new DateTimeImmutable(null, timezone_open("Europe/Paris")); + $now = new DateTimeImmutable("now", timezone_open("Europe/Paris")); $this->setdatemodif($now); $this->addeditcount(); } |