Gazelle/sections/comments/take_edit.php

17 lines
473 B
PHP
Raw Permalink Normal View History

2013-08-28 23:08:41 +00:00
<?
authorize();
if (!isset($_POST['postid']) || !is_number($_POST['postid']) || !isset($_POST['body']) || trim($_POST['body']) === '') {
error(0);
}
2013-11-25 08:00:49 +00:00
if ($LoggedUser['DisablePosting']) {
error('Your posting privileges have been removed.');
}
2014-04-19 08:00:50 +00:00
$SendPM = isset($_POST['pm']) && $_POST['pm'];
Comments::edit((int)$_POST['postid'], $_POST['body'], $SendPM);
2013-08-28 23:08:41 +00:00
// This gets sent to the browser, which echoes it in place of the old body
2013-12-12 08:01:01 +00:00
echo Text::full_format($_POST['body']);