summaryrefslogtreecommitdiff
path: root/inc/mod/pages.php
diff options
context:
space:
mode:
authorMarcin Łabanowski <marcin@6irc.net>2013-01-26 15:03:31 +0100
committerMarcin Łabanowski <marcin@6irc.net>2013-01-26 15:03:31 +0100
commit9b7b1c996f8800efc533dd11a82dffcefdeb726e (patch)
tree0ffb1d00c418a02c49e3edbef600dbc38bd5d9d2 /inc/mod/pages.php
parent55d752073ddf7c34d56271af490c215ace9c7ec7 (diff)
Revert "[EDIT] restore previous behaviour (editing of html, not bbcode)"
This reverts commit 55d752073ddf7c34d56271af490c215ace9c7ec7.
Diffstat (limited to 'inc/mod/pages.php')
-rw-r--r--inc/mod/pages.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index 96ed0110..643786b4 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1005,7 +1005,7 @@ function mod_edit_post($board, $postID) {
error($config['error']['404']);
if (isset($_POST['name'], $_POST['email'], $_POST['subject'], $_POST['body'])) {
- $query = prepare(sprintf('UPDATE `posts_%s` SET `name` = :name, `email` = :email, `subject` = :subject, `body` = :body WHERE `id` = :id', $board));
+ $query = prepare(sprintf('UPDATE `posts_%s` SET `name` = :name, `email` = :email, `subject` = :subject, `body_nomarkup` = :body WHERE `id` = :id', $board));
$query->bindValue(':id', $postID);
$query->bindValue('name', $_POST['name']);
$query->bindValue(':email', $_POST['email']);
@@ -1013,6 +1013,7 @@ function mod_edit_post($board, $postID) {
$query->bindValue(':body', $_POST['body']);
$query->execute() or error(db_error($query));
+ rebuildPost($postID);
buildIndex();
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['dir']['res'] . sprintf($config['file_page'], $post['thread'] ? $post['thread'] : $postID) . '#' . $postID, true, $config['redirect_http']);