Merge pull request #1 from typecho/master

同步最新
This commit is contained in:
ShingChi 2014-03-11 15:23:15 +08:00
commit d9746ef847
116 changed files with 219 additions and 96 deletions

View File

@ -120,11 +120,10 @@ $(document).ready(function() {
$('#tab-files').bind('init', function () {
var uploader = new plupload.Uploader({
browse_button : $('.upload-file').get(0),
url : '<?php $options->index('/action/upload'
url : '<?php $security->index('/action/upload'
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
runtimes : 'html5,flash,silverlight,html4',
runtimes : 'html5,flash,html4',
flash_swf_url : '<?php $options->adminUrl('js/Moxie.swf'); ?>',
silverlight_xap_url : '<?php $options->adminUrl('js/Moxie.xap'); ?>',
drop_element : $('.upload-area').get(0),
filters : {
max_file_size : '<?php echo $phpMaxFilesize ?>',

Binary file not shown.

View File

@ -144,10 +144,9 @@ $(document).ready(function() {
var uploader = new plupload.Uploader({
browse_button : $('.upload-file').get(0),
url : '<?php $options->index('/action/upload?do=modify&cid=' . $attachment->cid); ?>',
runtimes : 'html5,flash,silverlight,html4',
url : '<?php $security->index('/action/upload?do=modify&cid=' . $attachment->cid); ?>',
runtimes : 'html5,flash,html4',
flash_swf_url : '<?php $options->adminUrl('js/Moxie.swf'); ?>',
silverlight_xap_url : '<?php $options->adminUrl('js/Moxie.xap'); ?>',
drop_element : $('.upload-area').get(0),
filters : {
max_file_size : '<?php echo $phpMaxFilesize ?>',

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Hello World
*

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-tb-8 col-tb-offset-2">

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="comments">
<?php $this->comments()->to($comments); ?>
<?php if ($comments->have()): ?>

View File

@ -1,5 +1,5 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
</div><!-- end .row -->
</div>
</div><!-- end #body -->

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form) {
$logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('站点LOGO地址'), _t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO'));

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
<html class="no-js">
<head>

View File

@ -7,7 +7,8 @@
* @version 1.2
* @link http://typecho.org
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">

View File

@ -1,3 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="col-mb-12 col-offset-1 col-3 kit-hidden-tb" id="secondary" role="complementary">
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>
<section class="widget">
@ -24,10 +25,7 @@
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('分类'); ?></h3>
<ul class="widget-list">
<?php $this->widget('Widget_Metas_Category_List')
->parse('<li><a href="{permalink}">{name}</a> ({count})</li>'); ?>
</ul>
<?php $this->widget('Widget_Metas_Category_List')->listCategories('wrapClass=widget-list'); ?>
</section>
<?php endif; ?>

View File

@ -336,6 +336,11 @@ textarea {
margin: 5px 0;
line-height: 1.5;
}
.widget-list li ul {
margin-left: 15px;
}
.widget-list a:hover {
}

View File

@ -7,27 +7,6 @@
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
/** IXR值 */
require_once 'IXR/Value.php';
/** IXR消息 */
require_once 'IXR/Message.php';
/** IXR请求体 */
require_once 'IXR/Request.php';
/** IXR错误 */
require_once 'IXR/Error.php';
/** IXR日期 */
require_once 'IXR/Date.php';
/** IXR Base64编码 */
require_once 'IXR/Base64.php';
/** Typecho_Http_Client */
require_once 'Typecho/Http/Client.php';
/**
* IXR客户端
* reload by typecho team(http://www.typecho.org)

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/*
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
@ -7,9 +8,6 @@
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
/** IXR_Clinet */
require_once 'IXR/Clinet.php';
/**
* IXR客户端
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/*
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/*
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002
Version 1.61 - Simon Willison, 11th July 2003 (htmlentities -> htmlspecialchars)
@ -7,9 +8,6 @@
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
/** IXR_Server */
require_once 'IXR/Server.php';
/**
* IXR服务器
*

View File

@ -7,24 +7,6 @@
Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
*/
/** IXR值 */
require_once 'IXR/Value.php';
/** IXR消息 */
require_once 'IXR/Message.php';
/** IXR请求体 */
require_once 'IXR/Request.php';
/** IXR错误 */
require_once 'IXR/Error.php';
/** IXR日期 */
require_once 'IXR/Date.php';
/** IXR Base64编码 */
require_once 'IXR/Base64.php';
/**
* IXR服务器
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* CURL适配器
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Socket适配器
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -152,6 +152,34 @@ class Typecho_Request
return $value;
}
/**
* 检查ip地址是否合法
*
* @param string $ip ip地址
* @return boolean
*/
private function _checkIp($ip)
{
if (function_exists('filter_var')) {
return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)
|| filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6);
}
return preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $ip)
|| preg_match("/^[0-9a-f:]+$/i", $ip);
}
/**
* 检查ua是否合法
*
* @param $agent ua字符串
* @return boolean
*/
private function _checkAgent($agent)
{
return preg_match("/^[_a-z0-9- ,:;=#@\.\(\)\/\+\*\?]+$/i", $agent);
}
/**
* 设置过滤器
*
@ -592,21 +620,27 @@ class Typecho_Request
*/
public function setIp($ip = NULL)
{
switch (true) {
case NULL !== $this->getServer('HTTP_X_FORWARDED_FOR'):
list($this->_ip) = array_map('trim', explode(',', $this->getServer('HTTP_X_FORWARDED_FOR')));
return;
case NULL !== $this->getServer('HTTP_CLIENT_IP'):
$this->_ip = $this->getServer('HTTP_CLIENT_IP');
return;
case NULL !== $this->getServer('REMOTE_ADDR'):
$this->_ip = $this->getServer('REMOTE_ADDR');
return;
default:
break;
if (!empty($ip)) {
$this->_ip = $ip;
} else {
switch (true) {
case NULL !== $this->getServer('HTTP_X_FORWARDED_FOR'):
list($this->_ip) = array_map('trim', explode(',', $this->getServer('HTTP_X_FORWARDED_FOR')));
break;
case NULL !== $this->getServer('HTTP_CLIENT_IP'):
$this->_ip = $this->getServer('HTTP_CLIENT_IP');
break;
case NULL !== $this->getServer('REMOTE_ADDR'):
$this->_ip = $this->getServer('REMOTE_ADDR');
break;
default:
break;
}
}
$this->_ip = 'unknown';
if (empty($this->_ip) || !self::_checkIp($this->_ip)) {
$this->_ip = 'unknown';
}
}
/**
@ -633,7 +667,8 @@ class Typecho_Request
*/
public function setAgent($agent = NULL)
{
$this->_agent = (NULL === $agent) ? $this->getServer('HTTP_USER_AGENT') : $agent;
$agent = (NULL === $agent) ? $this->getServer('HTTP_USER_AGENT') : $agent;
$this->_agent = self::_checkAgent($agent) ? $agent : '';
}
/**

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 表单处理帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 表单元素抽象帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 多选框帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 虚拟域帮手类
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 隐藏域帮手类
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 密码输入表单项帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 单选框帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 下拉选择框帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 提交按钮表单项帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文字输入表单项帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 多行文字域帮手
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 纯数据抽象组件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
@ -140,6 +141,22 @@ class Widget_Abstract_Contents extends Widget_Abstract
return $this->pluginHandle(__CLASS__)->contentEx($content, $this);
}
/**
* 输出文章的第一行作为摘要
*
* @return string
*/
protected function ___summary()
{
$content = $this->content;
$parts = preg_split("/<\/\s*(?:p|blockquote|q|pre)\s*>/i", $content, 2);
if (!empty($parts)) {
$content = $parts[0] . '</p>';
}
return $content;
}
/**
* 锚点id
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 描述性数据
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 全局选项
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 用户抽象组件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 异步调用组件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 评论归档
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 回响归档
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文件管理列表
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑文章
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章相关文件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 没有关联的文件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 独立页面管理列表
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑页面
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 独立页面列表
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章管理列表
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 按日期归档列表组件
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑文章
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 最新文章
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 相关内容
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 相关内容
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 反馈提交
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 登录动作
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 登出动作
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Widget_Metas_Category_Admin

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑分类
*
@ -199,7 +200,9 @@ class Widget_Metas_Category_Edit extends Widget_Abstract_Metas implements Widget
$name->addRule('required', _t('必须填写分类名称'));
$name->addRule(array($this, 'nameExists'), _t('分类名称已经存在'));
$name->addRule(array($this, 'nameToSlug'), _t('分类名称无法被转换为缩略名'));
$name->addRule('xssCheck', _t('请不要在分类名称中使用特殊字符'));
$slug->addRule(array($this, 'slugExists'), _t('缩略名已经存在'));
$slug->addRule('xssCheck', _t('请不要在缩略名中使用特殊字符'));
}
if ('update' == $action) {

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 分类输出
*
@ -36,12 +37,12 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
private $_treeViewCategories = array();
/**
* _singleCategoryOptions
* _categoryOptions
*
* @var mixed
* @access private
*/
private $_singleCategoryOptions = NULL;
private $_categoryOptions = NULL;
/**
* 顶层分类
@ -132,26 +133,24 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
/**
* 列出分类回调
*
* @param mixed $singleCategoryOptions
* @access private
* @return void
*/
private function treeViewCategoriesCallback()
{
$singleCategoryOptions = $this->_singleCategoryOptions;
$categoryOptions = $this->_categoryOptions;
if ($this->_customTreeViewCategoriesCallback) {
return treeViewCategories($this, $singleCategoryOptions);
return treeViewCategories($this, $categoryOptions);
}
$classes = array();
if ($singleCategoryOptions->itemClass) {
if ($categoryOptions->itemClass) {
$classes[] = $singleCommentOptions->itemClass;
}
$classes[] = 'category-level-' . $this->levels;
echo '<' . $singleCategoryOptions->itemTag . ' class="'
echo '<' . $categoryOptions->itemTag . ' class="'
. implode(' ', $classes);
if ($this->levels > 0) {
@ -163,12 +162,12 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
echo '"><a href="' . $this->permalink . '">' . $this->name . '</a>';
if ($singleCategoryOptions->showCount) {
printf($singleCategoryOptions->countTemplate, intval($this->count));
if ($categoryOptions->showCount) {
printf($categoryOptions->countTemplate, intval($this->count));
}
if ($singleCategoryOptions->showFeed) {
printf($singleCategoryOptions->feedTemplate, $this->feedUrl);
if ($categoryOptions->showFeed) {
printf($categoryOptions->feedTemplate, $this->feedUrl);
}
if ($this->children) {
@ -181,9 +180,9 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
/**
* 预处理分类迭代
*
* @param array $categories
* @param array $categories
* @param array $parents
* @access private
* @return void
*/
private function levelWalkCallback(array $categories, $parents = array())
{
@ -252,8 +251,8 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
$this->sequence ++;
//在子评论之前输出
echo '<' . $this->_singleCategoryOptions->wrapTag . (empty($this->_singleCategoryOptions->wrapClass)
? '' : ' class="' . $this->_singleCategoryOptions->wrapClass . '"') . '>';
echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass)
? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>';
foreach ($children as $child) {
$this->row = $child;
@ -262,7 +261,7 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
}
//在子评论之后输出
echo '</' . $this->_singleCategoryOptions->wrapTag . '>';
echo '</' . $this->_categoryOptions->wrapTag . '>';
$this->sequence --;
}
@ -270,15 +269,16 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
/**
* treeViewCategories
*
*
* @param $categoryOptions 输出选项
* @access public
* @return void
*/
public function listCategories($singleCategoryOptions = NULL)
public function listCategories($categoryOptions = NULL)
{
//初始化一些变量
$this->_singleCategoryOptions = Typecho_Config::factory($singleCategoryOptions);
$this->_singleCategoryOptions->setDefault(array(
$this->_categoryOptions = Typecho_Config::factory($categoryOptions);
$this->_categoryOptions->setDefault(array(
'wrapTag' => 'ul',
'wrapClass' => '',
'itemTag' => 'li',
@ -290,18 +290,18 @@ class Widget_Metas_Category_List extends Widget_Abstract_Metas
));
// 插件插件接口
$this->pluginHandle()->trigger($plugged)->listCategories($this->_singleCategoryOptions, $this);
$this->pluginHandle()->trigger($plugged)->listCategories($this->_categoryOptions, $this);
if (!$plugged) {
$this->stack = $this->getCategories($this->_top);
if ($this->have()) {
echo '<' . $this->_singleCategoryOptions->wrapTag . (empty($this->_singleCategoryOptions->wrapClass)
? '' : ' class="' . $this->_singleCategoryOptions->wrapClass . '"') . '>';
echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass)
? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>';
while ($this->next()) {
$this->treeViewCategoriesCallback();
}
echo '</' . $this->_singleCategoryOptions->wrapTag . '>';
echo '</' . $this->_categoryOptions->wrapTag . '>';
}
$this->stack = $this->_map;

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 标签云
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 标签云
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 标签编辑
*
@ -181,7 +182,9 @@ class Widget_Metas_Tag_Edit extends Widget_Abstract_Metas implements Widget_Inte
$name->addRule('required', _t('必须填写标签名称'));
$name->addRule(array($this, 'nameExists'), _t('标签名称已经存在'));
$name->addRule(array($this, 'nameToSlug'), _t('标签名称无法被转换为缩略名'));
$name->addRule('xssCheck', _t('请不要标签名称中使用特殊字符'));
$slug->addRule(array($this, 'slugExists'), _t('缩略名已经存在'));
$slug->addRule('xssCheck', _t('请不要在缩略名中使用特殊字符'));
}
if ('update' == $action) {

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 全局选项
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 评论设置
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 基本设置
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 基本设置
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章阅读设置
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 插件管理
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

View File

@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*

Some files were not shown because too many files have changed in this diff Show More