This commit is contained in:
joyqi 2016-01-25 16:37:16 +08:00
parent 43087d6370
commit eca450855e
2 changed files with 2 additions and 28 deletions

View File

@ -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);
}

View File

@ -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&current=');
/** 初始化回调函数 */
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);
}