Skip to content
Snippets Groups Projects
blogcomment.php 454 B
Newer Older
<?php
/*
 * Comment posting AJAX service
 */

// don't output the site template
$no_template = TRUE;

// don't output anything before we've returned status
ob_start();
require_once("../lib/blog/blog.lib.php");

$blogid = $_POST['blog'];
$postid = $_POST['post'];
$blog = new blogs($blogid);

$ret = $blog->newComment($postid, FALSE);


if($ret[0]) {
	        echo "<split>OK";
} else {
	        echo "<split>ERROR<split>".$ret[1];
}

ob_end_flush();

?>