mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-02-01 01:29:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1524 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bc11b99a26
commit
188e64c603
2 changed files with 39 additions and 2 deletions
|
|
@ -51,7 +51,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 카테고리의 정보를 구해옴
|
// 카테고리의 정보를 구해옴
|
||||||
$oDocumentModel = &getModel('document');
|
$oDocumentModel = &getModel('document');
|
||||||
$category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
$category_list = $oDocumentModel->getCategoryList($this->module_srl);
|
||||||
|
|
@ -286,6 +285,44 @@
|
||||||
printContent($content);
|
printContent($content);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// 최신글 받기
|
||||||
|
case 'metaWeblog.getRecentPosts' :
|
||||||
|
// 목록을 구하기 위한 옵션
|
||||||
|
$args->module_srl = $this->module_srl; ///< 현재 모듈의 module_srl
|
||||||
|
$args->page = 1;
|
||||||
|
$args->list_count = 20;
|
||||||
|
$args->sort_index = 'list_order'; ///< 소팅 값
|
||||||
|
$output = $oDocumentModel->getDocumentList($args);
|
||||||
|
if(!$output->toBool() || !$output->data) {
|
||||||
|
$content = getXmlRpcFailure(1, 'post not founded');
|
||||||
|
printContent($content);
|
||||||
|
} else {
|
||||||
|
$posts = array();
|
||||||
|
foreach($output->data as $key => $val) {
|
||||||
|
$post = null;
|
||||||
|
$post->link = $post->permaLink = getUrl('','mid',$this->mid,'document_srl',$val->document_srl);
|
||||||
|
$post->userid = $val->user_id;
|
||||||
|
$post->mt_allow_pings = 0;
|
||||||
|
$post->mt_allow_comments = $val->allow_comment=='Y'?1:0;
|
||||||
|
$post->description = $val->content;
|
||||||
|
$post->postid = $val->document_srl;
|
||||||
|
$post->title = $val->title;
|
||||||
|
|
||||||
|
$year = substr($val->regdate,0,4);
|
||||||
|
$month = substr($val->regdate,4,2);
|
||||||
|
$day = substr($val->regdate,6,2);
|
||||||
|
$hour = substr($val->regdate,8,2);
|
||||||
|
$min = substr($val->regdate,10,2);
|
||||||
|
$sec = substr($val->regdate,12,2);
|
||||||
|
$time = mktime($hour,$min,$sec,$month,$day,$year);
|
||||||
|
$post->dateCreated = gmdate("D, d M Y H:i:s", $time);
|
||||||
|
$posts[] = $post;
|
||||||
|
}
|
||||||
|
$content = getXmlRpcResponse($posts);
|
||||||
|
printContent($content);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
// 아무런 요청이 없을 경우 RSD 출력
|
// 아무런 요청이 없을 경우 RSD 출력
|
||||||
default :
|
default :
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
$info->description = $this->module_info->description;
|
$info->description = $this->module_info->description;
|
||||||
$info->language = Context::getLangType();
|
$info->language = Context::getLangType();
|
||||||
$info->date = gmdate("D, d M Y H:i:s");
|
$info->date = gmdate("D, d M Y H:i:s");
|
||||||
$info->link = sprintf("%s?mid=%s", Context::getRequestUri(), Context::get('mid'));
|
$info->link = getUrl('','mid',Context::get('mid'));
|
||||||
$info->total_count = $output->total_count;
|
$info->total_count = $output->total_count;
|
||||||
|
|
||||||
if(count($document_list)) {
|
if(count($document_list)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue