From 7001272f4e8b683cbc64564c5798d85a34ab9026 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Fri, 10 Jan 2020 15:28:29 +0100 Subject: refact : ptime pdate added inside of page --- app/class/Controllerpage.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'app/class/Controllerpage.php') 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)]); -- cgit v1.2.3