mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 08:39:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@93 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cffcab9f74
commit
bc1b8c03f9
3 changed files with 48 additions and 48 deletions
|
|
@ -82,7 +82,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief error값이 0이 아니면 오류 (Output::toBool()의 aliasing)
|
* @brief error값이 0이 아니면 오류 (Object::toBool()의 aliasing)
|
||||||
**/
|
**/
|
||||||
function toBoolean() {
|
function toBoolean() {
|
||||||
return $this->toBool();
|
return $this->toBool();
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,7 @@
|
||||||
// parent_srl이 있으면 답변으로
|
// parent_srl이 있으면 답변으로
|
||||||
if($obj->parent_srl) {
|
if($obj->parent_srl) {
|
||||||
$comment = $oComment->getComment($obj->parent_srl);
|
$comment = $oComment->getComment($obj->parent_srl);
|
||||||
if(!$comment) return new Output(-1, 'msg_invalid_request');
|
if(!$comment) return new Object(-1, 'msg_invalid_request');
|
||||||
$output = $oComment->insertComment($obj);
|
$output = $oComment->insertComment($obj);
|
||||||
$comment_srl = $output->get('comment_srl');
|
$comment_srl = $output->get('comment_srl');
|
||||||
// 없으면 신규
|
// 없으면 신규
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
// comment_srl이 있으면 수정으로
|
// comment_srl이 있으면 수정으로
|
||||||
} else {
|
} else {
|
||||||
$comment = $oComment->getComment($obj->comment_srl);
|
$comment = $oComment->getComment($obj->comment_srl);
|
||||||
if(!$comment) return new Output(-1, 'msg_invalid_request');
|
if(!$comment) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
$obj->parent_srl = $comment->parent_srl;
|
$obj->parent_srl = $comment->parent_srl;
|
||||||
$output = $oComment->updateComment($obj);
|
$output = $oComment->updateComment($obj);
|
||||||
|
|
|
||||||
|
|
@ -14,13 +14,13 @@
|
||||||
var $page_count = 10; ///< 페이지의 수
|
var $page_count = 10; ///< 페이지의 수
|
||||||
var $category_list = NULL; ///< 카테고리 목록
|
var $category_list = NULL; ///< 카테고리 목록
|
||||||
|
|
||||||
var $grant_list = array( ///< 권한의 종류를 미리 설정
|
var $grant_list = array(
|
||||||
'list',
|
'list',
|
||||||
'view',
|
'view',
|
||||||
'write_document',
|
'write_document',
|
||||||
'write_comment',
|
'write_comment',
|
||||||
'fileupload',
|
'fileupload',
|
||||||
);
|
); ///< 권한의 종류를 미리 설정
|
||||||
|
|
||||||
var $editor = 'default'; ///< 에디터 종류
|
var $editor = 'default'; ///< 에디터 종류
|
||||||
|
|
||||||
|
|
@ -129,46 +129,46 @@
|
||||||
$search_target = Context::get('search_target');
|
$search_target = Context::get('search_target');
|
||||||
$keyword = Context::get('keyword');
|
$keyword = Context::get('keyword');
|
||||||
if($search_target && $keyword) {
|
if($search_target && $keyword) {
|
||||||
$keyword = str_replace(' ','%',$keyword);
|
$keyword = str_replace(' ','%',$keyword);
|
||||||
switch($search_target) {
|
switch($search_target) {
|
||||||
case 'title' :
|
case 'title' :
|
||||||
$search_obj->s_title = $keyword;
|
$search_obj->s_title = $keyword;
|
||||||
break;
|
break;
|
||||||
case 'content' :
|
case 'content' :
|
||||||
$search_obj->s_content = $keyword;
|
$search_obj->s_content = $keyword;
|
||||||
break;
|
break;
|
||||||
case 'title_content' :
|
case 'title_content' :
|
||||||
$search_obj->s_title = $keyword;
|
$search_obj->s_title = $keyword;
|
||||||
$search_obj->s_content = $keyword;
|
$search_obj->s_content = $keyword;
|
||||||
break;
|
break;
|
||||||
case 'user_name' :
|
case 'user_name' :
|
||||||
$search_obj->s_user_name = $keyword;
|
$search_obj->s_user_name = $keyword;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 카테고리
|
// 카테고리
|
||||||
$category = Context::get('category');
|
$category = Context::get('category');
|
||||||
if($category) $search_obj->category_srl = $category;
|
if($category) $search_obj->category_srl = $category;
|
||||||
|
|
||||||
// 목록의 경우 document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
// 목록의 경우 document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
|
||||||
$output = $oDocument->getDocumentList($this->module_srl, 'list_order', $page, $this->list_count, $this->page_count, $search_obj);
|
$output = $oDocument->getDocumentList($this->module_srl, 'list_order', $page, $this->list_count, $this->page_count, $search_obj);
|
||||||
|
|
||||||
// 템플릿에 쓰기 위해서 context::set
|
// 템플릿에 쓰기 위해서 context::set
|
||||||
Context::set('total_count', $output->total_count);
|
Context::set('total_count', $output->total_count);
|
||||||
Context::set('total_page', $output->total_page);
|
Context::set('total_page', $output->total_page);
|
||||||
Context::set('page', $output->page);
|
Context::set('page', $output->page);
|
||||||
Context::set('document_list', $output->data);
|
Context::set('document_list', $output->data);
|
||||||
Context::set('page_navigation', $output->page_navigation);
|
Context::set('page_navigation', $output->page_navigation);
|
||||||
|
|
||||||
// 템플릿에서 사용할 검색옵션 세팅
|
// 템플릿에서 사용할 검색옵션 세팅
|
||||||
$count_search_option = count($this->search_option);
|
$count_search_option = count($this->search_option);
|
||||||
for($i=0;$i<$count_search_option;$i++) {
|
for($i=0;$i<$count_search_option;$i++) {
|
||||||
$search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]);
|
$search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]);
|
||||||
}
|
}
|
||||||
Context::set('search_option', $search_option);
|
Context::set('search_option', $search_option);
|
||||||
|
|
||||||
$this->setTemplateFile('list');
|
$this->setTemplateFile('list');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -246,14 +246,14 @@
|
||||||
$parent_srl = Context::get('comment_srl');
|
$parent_srl = Context::get('comment_srl');
|
||||||
|
|
||||||
// 지정된 원 댓글이 없다면 오류
|
// 지정된 원 댓글이 없다면 오류
|
||||||
if(!$parent_srl) return new Output(-1, 'msg_invalid_request');
|
if(!$parent_srl) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
// 해당 댓글를 찾아본다
|
// 해당 댓글를 찾아본다
|
||||||
$oComment = getModule('comment');
|
$oComment = getModule('comment');
|
||||||
$source_comment = $oComment->getComment($parent_srl);
|
$source_comment = $oComment->getComment($parent_srl);
|
||||||
|
|
||||||
// 댓글이 없다면 오류
|
// 댓글이 없다면 오류
|
||||||
if(!$source_comment) return new Output(-1, 'msg_invalid_request');
|
if(!$source_comment) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
// 필요한 정보들 세팅
|
// 필요한 정보들 세팅
|
||||||
Context::set('document_srl',$document_srl);
|
Context::set('document_srl',$document_srl);
|
||||||
|
|
@ -276,14 +276,14 @@
|
||||||
$comment_srl = Context::get('comment_srl');
|
$comment_srl = Context::get('comment_srl');
|
||||||
|
|
||||||
// 지정된 댓글이 없다면 오류
|
// 지정된 댓글이 없다면 오류
|
||||||
if(!$comment_srl) return new Output(-1, 'msg_invalid_request');
|
if(!$comment_srl) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
// 해당 댓글를 찾아본다
|
// 해당 댓글를 찾아본다
|
||||||
$oComment = getModule('comment');
|
$oComment = getModule('comment');
|
||||||
$comment = $oComment->getComment($comment_srl);
|
$comment = $oComment->getComment($comment_srl);
|
||||||
|
|
||||||
// 댓글이 없다면 오류
|
// 댓글이 없다면 오류
|
||||||
if(!$comment) return new Output(-1, 'msg_invalid_request');
|
if(!$comment) return new Object(-1, 'msg_invalid_request');
|
||||||
|
|
||||||
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
// 글을 수정하려고 할 경우 권한이 없는 경우 비밀번호 입력화면으로
|
||||||
if($comment_srl&&$comment&&!$_SESSION['own_comment'][$comment_srl]) return $this->setTemplateFile('input_password_form');
|
if($comment_srl&&$comment&&!$_SESSION['own_comment'][$comment_srl]) return $this->setTemplateFile('input_password_form');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue