mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Merge pull request #656 from upgle/develop
blogAPI 애드온 글 불러오기 버그 수정 및 500에러 개선
This commit is contained in:
commit
3843642a14
2 changed files with 13 additions and 2 deletions
|
|
@ -30,6 +30,13 @@ if($_REQUEST['act'] != 'api')
|
|||
// Read func file
|
||||
require_once(_XE_PATH_ . 'addons/blogapi/blogapi.func.php');
|
||||
|
||||
// If HTTP_RAW_POST_DATA is NULL, Print error message
|
||||
if(!$GLOBALS['HTTP_RAW_POST_DATA'])
|
||||
{
|
||||
$content = getXmlRpcFailure(1, 'Invalid Method Call');
|
||||
printContent($content);
|
||||
}
|
||||
|
||||
// xmlprc parsing
|
||||
// Parse the requested xmlrpc
|
||||
$xml = new SimpleXMLElement($GLOBALS['HTTP_RAW_POST_DATA']);
|
||||
|
|
@ -487,7 +494,7 @@ if($called_position == 'before_module_proc')
|
|||
$post = new stdClass();
|
||||
$post->categories = array();
|
||||
$post->dateCreated = date("Ymd", $oDocument->getRegdateTime()) . 'T' . date("H:i:s", $oDocument->getRegdateTime());
|
||||
$post->description = htmlspecialchars($oEditorController->transComponent($oDocument->getContent(false, false, true, false)), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
$post->description = sprintf('<![CDATA[%s]]>',$oEditorController->transComponent($oDocument->getContent(false, false, true, false)));
|
||||
$post->link = $post->permaLink = getFullUrl('', 'document_srl', $oDocument->document_srl);
|
||||
$post->postid = $oDocument->document_srl;
|
||||
$post->title = htmlspecialchars($oDocument->get('title'), ENT_COMPAT | ENT_HTML401, 'UTF-8', false);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,11 @@ function getXmlRpcResponse($params)
|
|||
// Encoding
|
||||
function _getEncodedVal($val, $is_sub_set = false)
|
||||
{
|
||||
if(is_int($val))
|
||||
if(preg_match('/^\<\!\[CDATA\[/',$val))
|
||||
{
|
||||
$buff = sprintf("<value>%s</value>", $val);
|
||||
}
|
||||
elseif(is_int($val))
|
||||
{
|
||||
$buff = sprintf("<value><i4>%d</i4></value>", $val);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue