修整 commentReply 为空时也输出空的 script 标签

This commit is contained in:
ShingChi 2013-11-16 23:02:41 +08:00
parent 7f629296da
commit 5af1e3c183

View File

@ -1533,8 +1533,9 @@ class Widget_Archive extends Widget_Abstract_Contents
}
if ($this->options->commentsThreaded && $this->is('single')) {
if (1 == $allows['commentReply']) {
$header .= "<script type=\"text/javascript\">
if ('' != $allows['commentReply']) {
if (1 == $allows['commentReply']) {
$header .= "<script type=\"text/javascript\">
//<![CDATA[
var TypechoComment = {
dom : function (id) {
@ -1606,8 +1607,9 @@ var TypechoComment = {
}
//]]>
</script>";
} else {
$header .= '<script src="' . $allows['commentReply'] . '" type="text/javascript"></script>';
} else {
$header .= '<script src="' . $allows['commentReply'] . '" type="text/javascript"></script>';
}
}
}