mirror of
https://github.com/typecho/typecho.git
synced 2025-03-19 17:39:42 +01:00
fix #407
This commit is contained in:
parent
43087d6370
commit
eca450855e
@ -43,14 +43,6 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
* @var array
|
||||
*/
|
||||
private $_threadedComments = array();
|
||||
|
||||
/**
|
||||
* 多级评论回调函数
|
||||
*
|
||||
* @access private
|
||||
* @var mixed
|
||||
*/
|
||||
private $_customThreadedCommentsCallback = false;
|
||||
|
||||
/**
|
||||
* _singleCommentOptions
|
||||
@ -73,11 +65,6 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
{
|
||||
parent::__construct($request, $response, $params);
|
||||
$this->parameter->setDefault('parentId=0&commentPage=0&commentsNum=0&allowComment=1');
|
||||
|
||||
/** 初始化回调函数 */
|
||||
if (function_exists('threadedComments')) {
|
||||
$this->_customThreadedCommentsCallback = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,7 +76,7 @@ class Widget_Comments_Archive extends Widget_Abstract_Comments
|
||||
private function threadedCommentsCallback()
|
||||
{
|
||||
$singleCommentOptions = $this->_singleCommentOptions;
|
||||
if ($this->_customThreadedCommentsCallback) {
|
||||
if (function_exists('threadedComments')) {
|
||||
return threadedComments($this, $singleCommentOptions);
|
||||
}
|
||||
|
||||
|
@ -20,14 +20,6 @@ if (!defined('__TYPECHO_ROOT_DIR__')) exit;
|
||||
*/
|
||||
class Widget_Metas_Category_List extends Widget_Abstract_Metas
|
||||
{
|
||||
/**
|
||||
* 多级分类回调函数
|
||||
*
|
||||
* @var boolean
|
||||
* @access private
|
||||
*/
|
||||
private $_customTreeViewCategoriesCallback = false;
|
||||
|
||||
/**
|
||||
* 树状分类结构
|
||||
*
|
||||
@ -96,11 +88,6 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
|
||||
{
|
||||
parent::__construct($request, $response, $params);
|
||||
$this->parameter->setDefault('ignore=0¤t=');
|
||||
|
||||
/** 初始化回调函数 */
|
||||
if (function_exists('treeViewCategories')) {
|
||||
$this->_customTreeViewCategoriesCallback = true;
|
||||
}
|
||||
|
||||
$select = $this->select()->where('type = ?', 'category');
|
||||
if ($this->parameter->ignore) {
|
||||
@ -137,7 +124,7 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
|
||||
private function treeViewCategoriesCallback()
|
||||
{
|
||||
$categoryOptions = $this->_categoryOptions;
|
||||
if ($this->_customTreeViewCategoriesCallback) {
|
||||
if (function_exists('treeViewCategories')) {
|
||||
return treeViewCategories($this, $categoryOptions);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user