aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerpage.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-10 15:28:29 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-10 15:28:29 +0100
commit7001272f4e8b683cbc64564c5798d85a34ab9026 (patch)
tree01f52cca7f8013b3b66bfbd29c2d4a1538b097b4 /app/class/Controllerpage.php
parent7eb6ec32c4313a7456370e47d3878ff961ec56d0 (diff)
downloadwcms-7001272f4e8b683cbc64564c5798d85a34ab9026.tar.gz
wcms-7001272f4e8b683cbc64564c5798d85a34ab9026.zip
refact : ptime pdate added inside of page
Diffstat (limited to 'app/class/Controllerpage.php')
-rw-r--r--app/class/Controllerpage.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php
index 2a67106..d1bfca5 100644
--- a/app/class/Controllerpage.php
+++ b/app/class/Controllerpage.php
@@ -315,11 +315,10 @@ class Controllerpage extends Controller
$this->movepanels();
$this->fontsize();
- $date = new DateTimeImmutable($_POST['pdate'] . $_POST['ptime'], new DateTimeZone('Europe/Paris'));
- $date = ['date' => $date];
+
if ($this->importpage()) {
- if ($this->canedit()) {
+ if ($this->canedit()) {
// Check if someone esle edited the page during the editing.
$oldpage = clone $this->page;
@@ -329,7 +328,6 @@ class Controllerpage extends Controller
}
- $this->page->hydrate($date);
$this->page->updateedited();
$this->page->addauthor($this->user->id());
$this->page->removeeditby($this->user->id());
@@ -405,7 +403,7 @@ class Controllerpage extends Controller
Config::savejson();
}
}
-
+
public function pagedirect($id)
{
$this->routedirect('pageread/', ['page' => idclean($id)]);