diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 046313e5..86f64fb5 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -1594,9 +1594,9 @@ function mod_edit_post($board, $edit_raw_html, $postID) { } if ($edit_raw_html) - $query = prepare(sprintf('UPDATE ``posts_%s`` SET `name` = :name,'. $trip .' `email` = :email, `subject` = :subject, `body` = :body, `body_nomarkup` = :body_nomarkup, `edited_at` = NOW() WHERE `id` = :id', $board)); + $query = prepare(sprintf('UPDATE ``posts_%s`` SET `name` = :name,'. $trip .' `email` = :email, `subject` = :subject, `body` = :body, `body_nomarkup` = :body_nomarkup, `edited_at` = UNIX_TIMESTAMP(NOW()) WHERE `id` = :id', $board)); else - $query = prepare(sprintf('UPDATE ``posts_%s`` SET `name` = :name,'. $trip .' `email` = :email, `subject` = :subject, `body_nomarkup` = :body, `edited_at` = NOW() WHERE `id` = :id', $board)); + $query = prepare(sprintf('UPDATE ``posts_%s`` SET `name` = :name,'. $trip .' `email` = :email, `subject` = :subject, `body_nomarkup` = :body, `edited_at` = UNIX_TIMESTAMP(NOW()) WHERE `id` = :id', $board)); $query->bindValue(':id', $postID); $query->bindValue(':name', $_POST['name'] ? $_POST['name'] : $config['anonymous']); $query->bindValue(':email', $_POST['email']); diff --git a/templates/post/edited_at.html b/templates/post/edited_at.html index 12ae4885..e5cd53ae 100644 --- a/templates/post/edited_at.html +++ b/templates/post/edited_at.html @@ -1,6 +1,6 @@
{% if post.edited_at %} -
{% trans 'Post last edited at' %} {{ post.edited_at }}
+
{% trans 'Post last edited at' %}
{% endif %} {% if post.clean.clean_local == '1' %}
{% trans 'Board rules permit this content' %}
diff --git a/templates/posts.sql b/templates/posts.sql index 01632033..47c0a65d 100644 --- a/templates/posts.sql +++ b/templates/posts.sql @@ -19,7 +19,7 @@ CREATE TABLE IF NOT EXISTS ``posts_{{ board }}`` ( `locked` int(1) NOT NULL, `sage` int(1) NOT NULL, `embed` text, - `edited_at` DATETIME NULL, + `edited_at` int(11) DEFAULT NULL, UNIQUE KEY `id` (`id`), KEY `thread_id` (`thread`,`id`), KEY `filehash` (`filehash`(40)),