mirror of https://github.com/IoTcat/YimianBlog.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.2 KiB
45 lines
1.2 KiB
<?php |
|
if (!defined('__TYPECHO_ROOT_DIR__')) exit; |
|
/** |
|
* 独立页面列表 |
|
* |
|
* @category typecho |
|
* @package Widget |
|
* @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) |
|
* @license GNU General Public License 2.0 |
|
* @version $Id$ |
|
*/ |
|
|
|
/** |
|
* 独立页面列表组件 |
|
* |
|
* @author qining |
|
* @category typecho |
|
* @package Widget |
|
* @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) |
|
* @license GNU General Public License 2.0 |
|
*/ |
|
class Widget_Contents_Page_List extends Widget_Abstract_Contents |
|
{ |
|
/** |
|
* 执行函数 |
|
* |
|
* @access public |
|
* @return void |
|
*/ |
|
public function execute() |
|
{ |
|
$select = $this->select()->where('table.contents.type = ?', 'page') |
|
->where('table.contents.status = ?', 'publish') |
|
->where('table.contents.created < ?', $this->options->time) |
|
->order('table.contents.order', Typecho_Db::SORT_ASC); |
|
|
|
//去掉自定义首页 |
|
$frontPage = explode(':', $this->options->frontPage); |
|
if (2 == count($frontPage) && 'page' == $frontPage[0]) { |
|
$select->where('table.contents.cid <> ?', $frontPage[1]); |
|
} |
|
|
|
$this->db->fetchAll($select, array($this, 'push')); |
|
} |
|
}
|
|
|