mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@901 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
516af645db
commit
742eebf669
9 changed files with 17 additions and 37 deletions
|
|
@ -1,6 +1,6 @@
|
|||
RewriteEngine On
|
||||
RewriteRule ^rss/([[:alnum:]]+)$ ./index.php?mid=$1&act=dispRss [L]
|
||||
RewriteRule ^trackback/([[:digit:]]+)$ ./index.php?document_srl=$1&act=procReceiveTrackback [L]
|
||||
RewriteRule ^trackback/([[:digit:]]+)$ ./index.php?module=trackback&act=procTrackbackReceive&document_srl=$1 [L]
|
||||
RewriteRule ^admin ./index.php?module=admin [L]
|
||||
RewriteRule ^([[:digit:]]+)$ ./index.php?document_srl=$1 [L]
|
||||
RewriteRule ^([[:alnum:]]+)$ ./index.php?mid=$1 [L]
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
* @brief 모듈객체를 받아서 content 출력
|
||||
**/
|
||||
function printContent(&$oModule) {
|
||||
debugPrint($oModule);
|
||||
|
||||
// header 출력
|
||||
$this->_printHeader();
|
||||
|
|
|
|||
|
|
@ -163,17 +163,6 @@
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 엮인글 추가
|
||||
**/
|
||||
function procBoardReceiveTrackback() {
|
||||
$obj = Context::gets('document_srl','url','title','excerpt');
|
||||
|
||||
// trackback module의 controller 객체 생성
|
||||
$oTrackbackController = &getController('trackback');
|
||||
$oTrackbackController->insertTrackback($obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 엮인글 삭제
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
<action name="procBoardVoteDocument" type="controller" />
|
||||
<action name="procBoardInsertComment" type="controller" />
|
||||
<action name="procBoardDeleteComment" type="controller" />
|
||||
<action name="procBoardReceiveTrackback" type="controller" />
|
||||
<action name="procBoardDeleteTrackback" type="controller" />
|
||||
<action name="procBoardVerificationPassword" type="controller" />
|
||||
<action name="procBoardDeleteFile" type="controller" />
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
<actions>
|
||||
<action name="dispTrackbackAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="procTrackbackAdminDeleteChecked" type="controller" standalone="true" />
|
||||
<action name="procTrackbackReceive" type="controller" standalone="true" />
|
||||
</actions>
|
||||
</module>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{'<?xml version="1.0" encoding="utf-8" ?>'}
|
||||
<response>
|
||||
<error>{$error}</error>
|
||||
<message><![CDATA[{$message}]]></message>
|
||||
<error>{$trackback_error}</error>
|
||||
<message><![CDATA[{$trackback_message}]]></message>
|
||||
</response>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
function moduleInstall() {
|
||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('trackback', 'controller', 'procTrackbackReceive');
|
||||
$oModuleController->insertActionForward('trackback', 'view', 'dispTrackbackAdminList');
|
||||
$oModuleController->insertActionForward('trackback', 'controller', 'procTrackbackAdminDeleteChecked');
|
||||
|
||||
|
|
|
|||
|
|
@ -38,21 +38,22 @@
|
|||
/**
|
||||
* @brief 엮인글 입력
|
||||
**/
|
||||
function insertTrackback($obj) {
|
||||
// dispMessage()를 위해 미리 View 객체 생성
|
||||
$oTrackbackView = &getView('trackback');
|
||||
function procTrackbackReceive() {
|
||||
Context::setResponseMethod("XMLRPC");
|
||||
|
||||
$args = Context::gets('document_srl','url','title','excerpt');
|
||||
|
||||
// GET으로 넘어온 document_srl을 참조, 없으면 오류~
|
||||
$document_srl = $obj->document_srl;
|
||||
if(!$document_srl) $oTrackbackView->dispMessage(-1, 'fail');
|
||||
if(!$document_srl) return $this->stop(-1, 'fail');
|
||||
|
||||
// document model 객체 생성후 원본글을 가져옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 원본글이 없거나 트랙백 허용을 하지 않으면 오류 표시
|
||||
if(!$document_srl) $oTrackbackView->dispMessage(-1,'fail');
|
||||
if($document->allow_trackback=='N') $oTrackbackView->dispMessage(-1,'fail');
|
||||
if(!$document_srl) return $this->stop(-1,'fail');
|
||||
if($document->allow_trackback=='N') return $this->stop(-1,'fail');
|
||||
|
||||
// 엮인글 정리
|
||||
$obj = Context::convertEncoding($obj);
|
||||
|
|
@ -65,7 +66,7 @@
|
|||
$output = executeQuery('trackback.insertTrackback', $obj);
|
||||
|
||||
// 입력에 이상이 없으면 해당 글의 엮인글 수를 올림
|
||||
if(!$output->toBool()) $oTrackbackView->dispMessage(-1, 'fail');
|
||||
if(!$output->toBool()) return $this->stop(-1, 'fail');
|
||||
|
||||
// trackback model 객체 생성
|
||||
$oTrackbackModel = &getModel('trackback');
|
||||
|
|
@ -80,8 +81,9 @@
|
|||
$output = $oDocumentController->updateTrackbackCount($document_srl, $trackback_count);
|
||||
|
||||
// 결과 return
|
||||
if(!$output->toBool()) $oTrackbackView->dispMessage(-1,'fail');
|
||||
else $oTrackbackView->dispMessage(0,'success');
|
||||
if(!$output->toBool()) return $this->stop(-1,'fail');
|
||||
|
||||
$this->setMessage('success');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -59,18 +59,5 @@
|
|||
$this->setTemplateFile('trackback_list');
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 메세지 출력
|
||||
* 메세지를 출력하고 그냥 종료 시켜 버림
|
||||
**/
|
||||
function dispMessage($error, $message) {
|
||||
// 결과 출력을 XMLRPC로 강제 지정
|
||||
Context::setResponseMethod("XMLRPC");
|
||||
|
||||
// 템플릿 지정
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('error');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue