Gazelle/sections/comments/take_edit.php
2013-12-12 08:01:01 +00:00

16 lines
417 B
PHP

<?
authorize();
if (!isset($_POST['postid']) || !is_number($_POST['postid']) || !isset($_POST['body']) || trim($_POST['body']) === '') {
error(0);
}
if ($LoggedUser['DisablePosting']) {
error('Your posting privileges have been removed.');
}
Comments::edit((int)$_POST['postid'], $_POST['body']);
// This gets sent to the browser, which echoes it in place of the old body
echo Text::full_format($_POST['body']);