mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 18:02:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1651 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
bd689e83da
commit
08b801f1e7
8 changed files with 35 additions and 31 deletions
|
|
@ -192,10 +192,10 @@
|
|||
$document_srl = array_pop($tmp_arr);
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$source_obj = $oDocumentModel->getDocument($document_srl);
|
||||
$obj = $oDocumentModel->getDocument($document_srl);
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
$obj = $oDocument->getObjectVars();
|
||||
|
||||
if(!$obj->is_granted) {
|
||||
if(!$oDocument->isGranted()) {
|
||||
$content = getXmlRpcFailure(1, 'no permisstion');
|
||||
break;
|
||||
}
|
||||
|
|
@ -259,7 +259,7 @@
|
|||
$obj->content = str_replace($uploaded_target_path,sprintf('/files/attach/images/%s/%s/%s', $this->module_srl, $document_srl, $filename), $obj->content);
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$output = $oDocumentController->updateDocument($source_obj,$obj);
|
||||
$output = $oDocumentController->updateDocument($oDocument,$obj);
|
||||
|
||||
if(!$output->toBool()) {
|
||||
$content = getXmlRpcFailure(1, $output->getMessage());
|
||||
|
|
@ -301,22 +301,22 @@
|
|||
|
||||
|
||||
$posts = array();
|
||||
foreach($output->data as $key => $val) {
|
||||
foreach($output->data as $key => $oDocument) {
|
||||
$post = null;
|
||||
$post->link = $post->permaLink = getUrl('','mid',$this->mid,'document_srl',$val->document_srl);
|
||||
$post->userid = $val->user_id;
|
||||
$post->link = $post->permaLink = getUrl('','mid',$this->mid,'document_srl',$oDocument->document_srl);
|
||||
$post->userid = $oDocument->get('user_id');
|
||||
$post->mt_allow_pings = 0;
|
||||
$post->mt_allow_comments = $val->allow_comment=='Y'?1:0;
|
||||
$post->description = htmlspecialchars($oContext->transContent($val->content));
|
||||
$post->postid = $val->document_srl;
|
||||
$post->title = htmlspecialchars($val->title);
|
||||
$post->mt_allow_comments = $oDocument->allowComment()=='Y'?1:0;
|
||||
$post->description = htmlspecialchars($oContext->transContent($oDocument->get('content')));
|
||||
$post->postid = $oDocument->document_srl;
|
||||
$post->title = htmlspecialchars($oDocument->get('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);
|
||||
$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;
|
||||
|
|
|
|||
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
// 이미 존재하는 글인지 체크
|
||||
$document_srl = Context::get('document_srl');
|
||||
$document = $oDocumentModel->getDocument($document_srl);
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 이미 존재하는 글이라면 return
|
||||
if($document->document_srl == $document_srl) return;
|
||||
if($oDocument->isExists()) return;
|
||||
break;
|
||||
// 댓글 작성시 신규 등록이 아니면 패스~
|
||||
case 'procInsertComment' :
|
||||
|
|
|
|||
|
|
@ -98,6 +98,11 @@
|
|||
return $this->variables;
|
||||
}
|
||||
|
||||
function getObjectVars() {
|
||||
foreach($this->variables as $key => $val) $output->{$key} = $val;
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief error값이 0이 아니면 오류
|
||||
**/
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* 2 : 1 + DB 쿼리
|
||||
* 3 : 모든 로그
|
||||
**/
|
||||
define('__DEBUG__', 1);
|
||||
define('__DEBUG__', 0);
|
||||
|
||||
/**
|
||||
* @brief 간단하게 사용하기 위한 함수 정의한 파일 require
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Jeong, Chan Myeong 070601~070630
|
|||
#content { width:100%; position:relative; padding-bottom:2em; background-color:#FFFFFF;}
|
||||
|
||||
/* Blog Layout - Common */
|
||||
#bodyWrap { position:relative; width:810px; margin:0 auto;}
|
||||
#bodyWrap { position:relative; width:820px; margin:0 auto; background-color:#FFFFFF;}
|
||||
|
||||
/* Blog Layout - Content Body */
|
||||
#contentBody { overflow:hidden; padding-bottom:2em; _width:100%;}
|
||||
|
|
@ -21,7 +21,7 @@ Jeong, Chan Myeong 070601~070630
|
|||
#columnRight {}
|
||||
|
||||
/* Blog Layout - Content */
|
||||
#content { float:left; width:620px; overflow:hidden;}
|
||||
#content { float:left; width:620px; overflow:hidden; padding-right:10px;}
|
||||
|
||||
#bodyWrap #accountNavigation { float:right; margin:1em 1em 0 0; padding-bottom:.5em; overflow:hidden;}
|
||||
#bodyWrap #accountNavigation li { float:left; margin-right:-1px; background:url(../images/white/blogHeaderVr.gif) no-repeat right center;}
|
||||
|
|
|
|||
|
|
@ -326,22 +326,22 @@
|
|||
|
||||
// 문서 원본을 가져옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
|
||||
// 글의 작성 ip와 현재 접속자의 ip가 동일하면 패스
|
||||
if($document->ipaddress == $_SERVER['REMOTE_ADDR']) {
|
||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR']) {
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
return new Object(-1, 'failed_voted');
|
||||
}
|
||||
|
||||
// document의 작성자가 회원일때 조사
|
||||
if($document->member_srl) {
|
||||
if($oDocument->get('member_srl')) {
|
||||
// member model 객체 생성
|
||||
$oMemberModel = &getModel('member');
|
||||
$member_srl = $oMemberModel->getLoggedMemberSrl();
|
||||
|
||||
// 글쓴이와 현재 로그인 사용자의 정보가 일치하면 읽었다고 생각하고 세션 등록후 패스
|
||||
if($member_srl && $member_srl == $document->member_srl) {
|
||||
if($member_srl && $member_srl == $oDocument->get('member_srl')) {
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
return new Object(-1, 'failed_voted');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@
|
|||
if(!$manual_inserted) {
|
||||
// document model 객체 생성후 원본글을 가져옴
|
||||
$oDocumentModel = &getModel('document');
|
||||
$document = $oDocumentModel->getDocument($document_srl);
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl);
|
||||
|
||||
// 원본글이 없거나 트랙백 허용을 하지 않으면 오류 표시
|
||||
if(!$document_srl) return $this->stop('fail');
|
||||
if($document->allow_trackback=='N') return new Object(-1,'fail');
|
||||
if(!$oDocument->isExists()) return $this->stop('fail');
|
||||
if(!$oDocument->allowTrackback()) return new Object(-1,'fail');
|
||||
|
||||
$obj->module_srl = $document->module_srl;
|
||||
$obj->module_srl = $oDocument->get('module_srl');
|
||||
}
|
||||
|
||||
// 엮인글 정리
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@
|
|||
$args->list_count = $obj->list_count;
|
||||
|
||||
$output = executeQuery('trackback.getNewestTrackbackList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue