mirror of
https://github.com/typecho/typecho.git
synced 2025-03-22 10:59:41 +01:00
fixed #90
This commit is contained in:
parent
51e79138a7
commit
398f881a41
@ -1370,8 +1370,13 @@ class Widget_Archive extends Widget_Abstract_Contents
|
||||
*/
|
||||
public function comments()
|
||||
{
|
||||
$parameter = array('parentId' => $this->hidden ? 0 : $this->cid, 'parentContent' => $this->row,
|
||||
'respondId' => $this->respondId, 'commentPage' => $this->request->filter('int')->commentPage);
|
||||
$parameter = array(
|
||||
'parentId' => $this->hidden ? 0 : $this->cid,
|
||||
'parentContent' => $this->row,
|
||||
'respondId' => $this->respondId,
|
||||
'commentPage' => $this->request->filter('int')->commentPage,
|
||||
'allowComment' => $this->allow('comment')
|
||||
);
|
||||
|
||||
return $this->widget('Widget_Comments_Archive', $parameter);
|
||||
}
|
||||
@ -1384,8 +1389,11 @@ class Widget_Archive extends Widget_Abstract_Contents
|
||||
*/
|
||||
public function pings()
|
||||
{
|
||||
return $this->widget('Widget_Comments_Ping', array('parentId' => $this->hidden ? 0 : $this->cid,
|
||||
'parentContent' => $this->row));
|
||||
return $this->widget('Widget_Comments_Ping', array(
|
||||
'parentId' => $this->hidden ? 0 : $this->cid,
|
||||
'parentContent' => $this->row,
|
||||
'allowPing' => $this->allow('ping')
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -63,7 +63,7 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
public function __construct($request, $response, $params = NULL)
|
||||
{
|
||||
parent::__construct($request, $response, $params);
|
||||
$this->parameter->setDefault('parentId=0&commentPage=0&commentsNum=0');
|
||||
$this->parameter->setDefault('parentId=0&commentPage=0&commentsNum=0&allowComment=1');
|
||||
|
||||
/** 初始化回调函数 */
|
||||
if (function_exists('threadedComments')) {
|
||||
@ -456,7 +456,7 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
*/
|
||||
public function reply($word = '')
|
||||
{
|
||||
if ($this->options->commentsThreaded && !$this->isTopLevel) {
|
||||
if ($this->options->commentsThreaded && !$this->isTopLevel && $this->parameter->allowComment) {
|
||||
$word = empty($word) ? _t('回复') : $word;
|
||||
$this->pluginHandle()->trigger($plugged)->reply($word, $this);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user