mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-24 07:30:10 +01:00
Revert "[EDIT] restore previous behaviour (editing of html, not bbcode)"
This reverts commit 55d752073d
.
This commit is contained in:
parent
55d752073d
commit
9b7b1c996f
@ -1005,7 +1005,7 @@ function mod_edit_post($board, $postID) {
|
|||||||
error($config['error']['404']);
|
error($config['error']['404']);
|
||||||
|
|
||||||
if (isset($_POST['name'], $_POST['email'], $_POST['subject'], $_POST['body'])) {
|
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(':id', $postID);
|
||||||
$query->bindValue('name', $_POST['name']);
|
$query->bindValue('name', $_POST['name']);
|
||||||
$query->bindValue(':email', $_POST['email']);
|
$query->bindValue(':email', $_POST['email']);
|
||||||
@ -1013,6 +1013,7 @@ function mod_edit_post($board, $postID) {
|
|||||||
$query->bindValue(':body', $_POST['body']);
|
$query->bindValue(':body', $_POST['body']);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
|
rebuildPost($postID);
|
||||||
buildIndex();
|
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']);
|
header('Location: ?/' . sprintf($config['board_path'], $board) . $config['dir']['res'] . sprintf($config['file_page'], $post['thread'] ? $post['thread'] : $postID) . '#' . $postID, true, $config['redirect_http']);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{% trans %}Comment{% endtrans %}
|
{% trans %}Comment{% endtrans %}
|
||||||
</th>
|
</th>
|
||||||
<td>
|
<td>
|
||||||
<textarea name="body" id="body" rows="5" cols="35">{{ post.body }}</textarea>
|
<textarea name="body" id="body" rows="5" cols="35">{{ post.body_nomarkup }}</textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
Loading…
Reference in New Issue
Block a user