From eca450855efae3dca77082a97bbec4e70757f2b1 Mon Sep 17 00:00:00 2001 From: joyqi <magike.net@gmail.com> Date: Mon, 25 Jan 2016 16:37:16 +0800 Subject: [PATCH] fix #407 --- var/Widget/Comments/Archive.php | 15 +-------------- var/Widget/Metas/Category/List.php | 15 +-------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/var/Widget/Comments/Archive.php b/var/Widget/Comments/Archive.php index 6a056398..1e846f28 100644 --- a/var/Widget/Comments/Archive.php +++ b/var/Widget/Comments/Archive.php @@ -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); } diff --git a/var/Widget/Metas/Category/List.php b/var/Widget/Metas/Category/List.php index cf85926a..b8aaba1a 100644 --- a/var/Widget/Metas/Category/List.php +++ b/var/Widget/Metas/Category/List.php @@ -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); }