git-svn-id: http://xe-core.googlecode.com/svn/trunk@903 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-04-02 09:17:33 +00:00
parent a620eaf236
commit 4d3d4ed9ad
3 changed files with 22 additions and 10 deletions

View file

@ -325,7 +325,21 @@
/** /**
* @brief request method가 어떤것인지 판단하여 저장 (GET/POST/XMLRPC) * @brief request method가 어떤것인지 판단하여 저장 (GET/POST/XMLRPC)
**/ **/
function _setRequestMethod() { function setRequestMethod($type) {
$oContext = &Context::getInstance();
$oContext->_setRequestMethod($type);
}
/**
* @brief request method가 어떤것인지 판단하여 저장 (GET/POST/XMLRPC)
**/
function _setRequestMethod($type = '') {
if($type) {
$this->request_method = $type;
return;
}
if($GLOBALS['HTTP_RAW_POST_DATA']) $this->request_method = "XMLRPC"; if($GLOBALS['HTTP_RAW_POST_DATA']) $this->request_method = "XMLRPC";
else $this->request_method = $_SERVER['REQUEST_METHOD']; else $this->request_method = $_SERVER['REQUEST_METHOD'];
} }

View file

@ -18,8 +18,6 @@
* @brief 모듈객체를 받아서 content 출력 * @brief 모듈객체를 받아서 content 출력
**/ **/
function printContent(&$oModule) { function printContent(&$oModule) {
debugPrint($oModule);
// header 출력 // header 출력
$this->_printHeader(); $this->_printHeader();

View file

@ -39,21 +39,21 @@
* @brief 엮인글 입력 * @brief 엮인글 입력
**/ **/
function procTrackbackReceive() { function procTrackbackReceive() {
Context::setResponseMethod("XMLRPC"); Context::setRequestMethod("XMLRPC");
$args = Context::gets('document_srl','url','title','excerpt'); $obj = Context::gets('document_srl','url','title','excerpt');
// GET으로 넘어온 document_srl을 참조, 없으면 오류~ // GET으로 넘어온 document_srl을 참조, 없으면 오류~
$document_srl = $obj->document_srl; $document_srl = $obj->document_srl;
if(!$document_srl) return $this->stop(-1, 'fail'); if(!$document_srl) return $this->stop('fail');
// document model 객체 생성후 원본글을 가져옴 // document model 객체 생성후 원본글을 가져옴
$oDocumentModel = &getModel('document'); $oDocumentModel = &getModel('document');
$document = $oDocumentModel->getDocument($document_srl); $document = $oDocumentModel->getDocument($document_srl);
// 원본글이 없거나 트랙백 허용을 하지 않으면 오류 표시 // 원본글이 없거나 트랙백 허용을 하지 않으면 오류 표시
if(!$document_srl) return $this->stop(-1,'fail'); if(!$document_srl) return $this->stop('fail');
if($document->allow_trackback=='N') return $this->stop(-1,'fail'); if($document->allow_trackback=='N') return $this->stop('fail');
// 엮인글 정리 // 엮인글 정리
$obj = Context::convertEncoding($obj); $obj = Context::convertEncoding($obj);
@ -66,7 +66,7 @@
$output = executeQuery('trackback.insertTrackback', $obj); $output = executeQuery('trackback.insertTrackback', $obj);
// 입력에 이상이 없으면 해당 글의 엮인글 수를 올림 // 입력에 이상이 없으면 해당 글의 엮인글 수를 올림
if(!$output->toBool()) return $this->stop(-1, 'fail'); if(!$output->toBool()) return $this->stop( 'fail');
// trackback model 객체 생성 // trackback model 객체 생성
$oTrackbackModel = &getModel('trackback'); $oTrackbackModel = &getModel('trackback');
@ -81,7 +81,7 @@
$output = $oDocumentController->updateTrackbackCount($document_srl, $trackback_count); $output = $oDocumentController->updateTrackbackCount($document_srl, $trackback_count);
// 결과 return // 결과 return
if(!$output->toBool()) return $this->stop(-1,'fail'); if(!$output->toBool()) return $this->stop('fail');
$this->setMessage('success'); $this->setMessage('success');
} }