Merge pull request #1 from typecho/master

同步最新
This commit is contained in:
ShingChi
2014-03-11 15:23:15 +08:00
116 changed files with 219 additions and 96 deletions
-21
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)
+1 -3
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客户端
*
+1
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)
+1 -3
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服务器
*
-18
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服务器
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* CURL适配器
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Socket适配器
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+49 -14
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 : '';
}
/**
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 表单处理帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 表单元素抽象帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 多选框帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 虚拟域帮手类
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 隐藏域帮手类
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 密码输入表单项帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 单选框帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 下拉选择框帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 提交按钮表单项帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文字输入表单项帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 多行文字域帮手
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 纯数据抽象组件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+17
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
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 描述性数据
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 全局选项
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 用户抽象组件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 异步调用组件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 评论归档
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 回响归档
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文件管理列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑文章
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章相关文件
*
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 没有关联的文件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 独立页面管理列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑页面
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 独立页面列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章管理列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 按日期归档列表组件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑文章
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 最新文章
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 相关内容
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 相关内容
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 反馈提交
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 登录动作
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 登出动作
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Widget_Metas_Category_Admin
+3
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) {
+25 -25
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;
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 标签云
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 标签云
*
+3
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) {
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 全局选项
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 评论设置
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 基本设置
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 基本设置
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 文章阅读设置
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 插件管理
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 注册组件
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 安全选项组件
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 通用异步服务
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 全局统计
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑风格
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 风格文件列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 风格列表
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 升级动作
*
+3
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 上传动作
*
@@ -64,6 +65,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
*/
private static function getSafeName(&$name)
{
$name = str_replace(array('"', '<', '>'), '', $name);
$name = str_replace('\\', '/', $name);
$name = false === strpos($name, '/') ? ('a' . $name) : str_replace('/', '/a', $name);
$info = pathinfo($name);
@@ -413,6 +415,7 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
public function action()
{
if ($this->user->pass('contributor', true) && $this->request->isPost()) {
$this->security->protect();
if ($this->request->is('do=modify&cid')) {
$this->modify();
} else {
+5
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 当前登录用户
@@ -123,6 +124,10 @@ class Widget_User extends Typecho_Widget
->where((strpos($name, '@') ? 'mail' : 'name') . ' = ?', $name)
->limit(1));
if (empty($user)) {
return false;
}
$hashValidate = $this->pluginHandle()->trigger($hashPluggable)->hashValidate($password, $user['password']);
if (!$hashPluggable) {
$hashValidate = Typecho_Common::hashValidate($password, $user['password']);
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* Typecho Blog Platform
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 相关内容
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑用户
*
+1
View File
@@ -1,4 +1,5 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
/**
* 编辑用户
*

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