From 7dae1725bb22f31c7c10efdd7a0398bac83dfe57 Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Sat, 5 Oct 2019 21:22:34 +0200 Subject: [PATCH] Keep date on draft pages, bug fix for #1088 --- bl-kernel/pages.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bl-kernel/pages.class.php b/bl-kernel/pages.class.php index 8ad6c240..df03af86 100644 --- a/bl-kernel/pages.class.php +++ b/bl-kernel/pages.class.php @@ -232,11 +232,8 @@ class Pages extends dbJSON { // This variable is not belong to the database so is not defined in $row $newKey = $this->generateKey($slug, $parent, false, $key); - // If the page is draft then the created date is the current - if ($row['type']=='draft') { - $row['date'] = Date::current(DB_DATE_FORMAT); - } elseif (!Valid::date($row['date'], DB_DATE_FORMAT)) { - // if the date in the arguments is not valid, take the value from the old row + // if the date in the arguments is not valid, take the value from the old row + if (!Valid::date($row['date'], DB_DATE_FORMAT)) { $row['date'] = $this->db[$key]['date']; }