Fixed bug when not post Title on comments

master
pecesama 2007-11-23 04:56:21 +00:00
parent 24428754b0
commit a46485e514
1 changed files with 13 additions and 1 deletions

View File

@ -289,8 +289,20 @@ $template = new plantillas($conf->template);
$comment = new comments();
$rsComments = $comment->getComments($register["id_post"]);
$textile = new Textile();
if (empty($register["title"])) {
if (!empty($register["description"])) {
if (strlen($register["description"]) > 30) {
$postTitle = substr($register["description"], 0, 30)."...";
}
}
} else {
$postTitle = $register["title"];
}
$postTitle = strip_tags($textile->TextileThis($postTitle));
$input = array("{Comments_Number}", "{Post_Title}");
$output = array($comment->countComments($register["id_post"]), $register["title"]);
$output = array($comment->countComments($register["id_post"]), $postTitle);
$template->precargarPlantillaConBloque($input, $output, "template_comments", "comments");
while($rowComment = mysql_fetch_assoc($rsComments)) {