From 3660a2f116f2d03c19aed088980ce9fb101f1098 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 27 May 2014 17:10:45 +0200 Subject: [PATCH] dashboard entry publish keep timestamp - fixes and closes #160 --- include/functions_entries.inc.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/functions_entries.inc.php b/include/functions_entries.inc.php index affc07b2..5a9187bc 100644 --- a/include/functions_entries.inc.php +++ b/include/functions_entries.inc.php @@ -1403,12 +1403,11 @@ function serendipity_updertEntry($entry) { } if ($entry['isdraft'] === 0) { - $entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!) + $entry['isdraft'] = 'false'; // make sure to commit a string value with dashboards entry publish (only!) + $entry['timestamp'] = $_entry['timestamp']; // dashboard publishing a draft shall not set a new entry timestamp } - //if (!serendipity_db_bool($entry['isdraft']) && !serendipity_db_bool($_entry['isdraft'])) { - $entry['last_modified'] = time(); - //} + $entry['last_modified'] = time(); $res = serendipity_db_update('entries', array('id' => $entry['id']), $entry); $newEntry = 0;