mirror of
https://github.com/typecho/typecho.git
synced 2025-04-22 10:43:57 +02:00
Merge pull request #955 from atomlong/master
Support Windows Live Writer and Open Live Writer.
This commit is contained in:
commit
77ef00e1a0
@ -126,6 +126,12 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
|
||||
if (!file_put_contents($path, $file['bytes'])) {
|
||||
return false;
|
||||
}
|
||||
} else if (isset($file['bits'])) {
|
||||
|
||||
//直接写入文件
|
||||
if (!file_put_contents($path, $file['bits'])) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -197,6 +203,14 @@ class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface
|
||||
if (!file_put_contents($path, $file['bytes'])) {
|
||||
return false;
|
||||
}
|
||||
} else if (isset($file['bits'])) {
|
||||
|
||||
@unlink($path);
|
||||
|
||||
//直接写入文件
|
||||
if (!file_put_contents($path, $file['bits'])) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
@ -1669,7 +1669,7 @@ class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface
|
||||
$result = Widget_Upload::uploadHandle($data);
|
||||
|
||||
if (false === $result) {
|
||||
return IXR_Error(500, _t('上传失败'));
|
||||
return new IXR_Error(500, _t('上传失败'));
|
||||
} else {
|
||||
|
||||
$insertId = $this->insert(array(
|
||||
@ -2169,7 +2169,7 @@ class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface
|
||||
return new IXR_Error(48, _t('PingBack已经存在'));
|
||||
}
|
||||
} else {
|
||||
return IXR_Error(49, _t('目标地址禁止Ping'));
|
||||
return new IXR_Error(49, _t('目标地址禁止Ping'));
|
||||
}
|
||||
} else {
|
||||
return new IXR_Error(33, _t('这个目标地址不存在'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user