mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 01:23:32 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6896 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f670f90237
commit
7d690f9acd
2 changed files with 26 additions and 25 deletions
|
|
@ -162,7 +162,6 @@
|
||||||
if(!$document_srl) {
|
if(!$document_srl) {
|
||||||
printContent( getXmlRpcFailure(1, 'no permission') );
|
printContent( getXmlRpcFailure(1, 'no permission') );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||||
if(!$oDocument->isExists() || !$oDocument->isGranted()) {
|
if(!$oDocument->isExists() || !$oDocument->isGranted()) {
|
||||||
|
|
@ -198,8 +197,8 @@
|
||||||
'</methodResponse>',
|
'</methodResponse>',
|
||||||
$category,
|
$category,
|
||||||
date("Ymd", $oDocument->getRegdateTime()).'T'.date("H:i:s", $oDocument->getRegdateTime()),
|
date("Ymd", $oDocument->getRegdateTime()).'T'.date("H:i:s", $oDocument->getRegdateTime()),
|
||||||
$oDocument->getContent(false),
|
$oDocument->getContent(false, false, true,false),
|
||||||
$oDocument->getPermanentUrl(),
|
getFullUrl('','document_srl', $oDocument->document_srl),
|
||||||
$oDocument->document_srl,
|
$oDocument->document_srl,
|
||||||
$oDocument->getTitleText()
|
$oDocument->getTitleText()
|
||||||
);
|
);
|
||||||
|
|
@ -275,9 +274,10 @@
|
||||||
$content = getXmlRpcFailure(1, $output->getMessage());
|
$content = getXmlRpcFailure(1, $output->getMessage());
|
||||||
} else {
|
} else {
|
||||||
//$content = getXmlRpcResponse(Context::getRequestUri().$this->mid.'/'.$document_srl);
|
//$content = getXmlRpcResponse(Context::getRequestUri().$this->mid.'/'.$document_srl);
|
||||||
$content = getXmlRpcResponse(''.$document_srl);
|
$content = getXmlRpcResponse($document_srl);
|
||||||
}
|
}
|
||||||
FileHandler::removeDir($tmp_uploaded_path);
|
FileHandler::removeDir($tmp_uploaded_path);
|
||||||
|
debugPrint($content);
|
||||||
|
|
||||||
printContent($content);
|
printContent($content);
|
||||||
break;
|
break;
|
||||||
|
|
@ -372,7 +372,7 @@
|
||||||
if(!$output->toBool()) {
|
if(!$output->toBool()) {
|
||||||
$content = getXmlRpcFailure(1, $output->getMessage());
|
$content = getXmlRpcFailure(1, $output->getMessage());
|
||||||
} else {
|
} else {
|
||||||
$content = getXmlRpcResponse(Context::getRequestUri().$this->mid.'/'.$document_srl);
|
$content = getXmlRpcResponse(getFullUrl('','document_srl',$document_srl));
|
||||||
FileHandler::removeDir($tmp_uploaded_path);
|
FileHandler::removeDir($tmp_uploaded_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -389,16 +389,22 @@
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||||
|
|
||||||
|
// 글 존재
|
||||||
|
if(!$oDocument->isExists()) {
|
||||||
|
$content = getXmlRpcFailure(1, 'not exists');
|
||||||
|
|
||||||
// 글 삭제 권한 체크
|
// 글 삭제 권한 체크
|
||||||
if(!$oDocument->isGranted()) {
|
} elseif(!$oDocument->isGranted()) {
|
||||||
$content = getXmlRpcFailure(1, 'no permission');
|
$content = getXmlRpcFailure(1, 'no permission');
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
$oDocumentController = &getController('document');
|
// 삭제
|
||||||
$output = $oDocumentController->deleteDocument($document_srl);
|
} else {
|
||||||
if(!$output->toBool()) $content = getXmlRpcFailure(1, $output->getMessage());
|
$oDocumentController = &getController('document');
|
||||||
else $content = getXmlRpcResponse(true);
|
$output = $oDocumentController->deleteDocument($document_srl);
|
||||||
|
if(!$output->toBool()) $content = getXmlRpcFailure(1, $output->getMessage());
|
||||||
|
else $content = getXmlRpcResponse(true);
|
||||||
|
}
|
||||||
|
|
||||||
printContent($content);
|
printContent($content);
|
||||||
break;
|
break;
|
||||||
|
|
@ -423,22 +429,16 @@
|
||||||
$posts = array();
|
$posts = array();
|
||||||
foreach($output->data as $key => $oDocument) {
|
foreach($output->data as $key => $oDocument) {
|
||||||
$post = null;
|
$post = null;
|
||||||
$post->link = $post->permaLink = getUrl('','mid',$this->mid,'document_srl',$oDocument->document_srl);
|
$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)));
|
||||||
|
$post->link = $post->permaLink = getFullUrl('','document_srl',$oDocument->document_srl);
|
||||||
|
$post->postid = $oDocument->document_srl;
|
||||||
|
$post->title = htmlspecialchars($oDocument->get('title'));
|
||||||
|
$post->publish = 1;
|
||||||
$post->userid = $oDocument->get('user_id');
|
$post->userid = $oDocument->get('user_id');
|
||||||
$post->mt_allow_pings = 0;
|
$post->mt_allow_pings = 0;
|
||||||
$post->mt_allow_comments = $oDocument->allowComment()=='Y'?1:0;
|
$post->mt_allow_comments = $oDocument->allowComment()=='Y'?1:0;
|
||||||
$post->description = htmlspecialchars($oEditorController->transComponent($oDocument->get('content')));
|
|
||||||
$post->postid = $oDocument->document_srl;
|
|
||||||
$post->title = htmlspecialchars($oDocument->get('title'));
|
|
||||||
|
|
||||||
$year = substr($oDocument->get('regdate'),0,4);
|
|
||||||
$month = substr($oDocument->get('regdate'),4,2);
|
|
||||||
$day = substr($oDocument->get('regdate'),6,2);
|
|
||||||
$hour = substr($oDocument->get('regdate'),8,2);
|
|
||||||
$min = substr($oDocument->get('regdate'),10,2);
|
|
||||||
$sec = substr($oDocument->get('regdate'),12,2);
|
|
||||||
$time = mktime($hour,$min,$sec,$month,$day,$year);
|
|
||||||
$post->dateCreated = gmdate("D, d M Y H:i:s", $time);
|
|
||||||
$posts[] = $post;
|
$posts[] = $post;
|
||||||
}
|
}
|
||||||
$content = getXmlRpcResponse($posts);
|
$content = getXmlRpcResponse($posts);
|
||||||
|
|
@ -456,7 +456,7 @@
|
||||||
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd" >
|
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd" >
|
||||||
<service>
|
<service>
|
||||||
<engineName>XpressEngine</engineName>
|
<engineName>XpressEngine</engineName>
|
||||||
<engineLink>http://www.zeroboard.com/ </engineLink>
|
<engineLink>http://www.xpressengine.com/ </engineLink>
|
||||||
<homePageLink>{$homepagelink}</homePageLink>
|
<homePageLink>{$homepagelink}</homePageLink>
|
||||||
<apis>
|
<apis>
|
||||||
<api name="MetaWeblog" preferred="true" apiLink="{$api_url}" blogID="" />
|
<api name="MetaWeblog" preferred="true" apiLink="{$api_url}" blogID="" />
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@
|
||||||
// 인코딩 처리
|
// 인코딩 처리
|
||||||
function _getEncodedVal($val, $is_sub_set = false) {
|
function _getEncodedVal($val, $is_sub_set = false) {
|
||||||
if(is_int($val)) $buff = sprintf("<value><i4>%d</i4></value>", $val);
|
if(is_int($val)) $buff = sprintf("<value><i4>%d</i4></value>", $val);
|
||||||
|
elseif(is_string($val)&&preg_match('/^([0-9]+)T([0-9\:]+)$/', $val)) $buff = sprintf("<value><dateTime.iso8601>%s</dateTime.iso8601></value>\n", $val);
|
||||||
elseif(is_double($val)) $buff = sprintf("<value><double>%f</double></value>", $val);
|
elseif(is_double($val)) $buff = sprintf("<value><double>%f</double></value>", $val);
|
||||||
elseif(is_bool($val)) $buff = sprintf("<value><boolean>%d</boolean></value>", $val?1:0);
|
elseif(is_bool($val)) $buff = sprintf("<value><boolean>%d</boolean></value>", $val?1:0);
|
||||||
elseif(is_object($val)) {
|
elseif(is_object($val)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue