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@864 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
5a2be2d812
commit
35b9bb8fd2
28 changed files with 186 additions and 485 deletions
|
|
@ -61,8 +61,6 @@
|
|||
if($document_srl != $document->document_srl) return new Object(-1,'msg_invalid_document');
|
||||
if($document->lock_comment=='Y') return new Object(-1,'msg_invalid_request');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$obj->list_order = $obj->comment_srl * -1;
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
|
||||
|
|
@ -83,7 +81,7 @@
|
|||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->comment_srl);
|
||||
|
||||
// 댓글을 입력
|
||||
$output = $oDB->executeQuery('comment.insertComment', $obj);
|
||||
$output = executeQuery('comment.insertComment', $obj);
|
||||
|
||||
// 입력에 이상이 없으면 해당 글의 댓글 수를 올림
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
@ -120,8 +118,6 @@
|
|||
// 권한이 있는지 확인
|
||||
if(!$is_admin && !$source_obj->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
if($obj->password) $obj->password = md5($obj->password);
|
||||
|
||||
// 로그인 되어 있고 작성자와 수정자가 동일하면 수정자의 정보를 세팅
|
||||
|
|
@ -152,7 +148,7 @@
|
|||
$obj->uploaded_count = $oFileModel->getFilesCount($obj->document_srl);
|
||||
|
||||
// 업데이트
|
||||
$output = $oDB->executeQuery('comment.updateComment', $obj);
|
||||
$output = executeQuery('comment.updateComment', $obj);
|
||||
|
||||
$output->add('comment_srl', $obj->comment_srl);
|
||||
return $output;
|
||||
|
|
@ -178,10 +174,8 @@
|
|||
if(!$is_admin && !$comment->is_granted) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteComment', $args);
|
||||
$output = executeQuery('comment.deleteComment', $args);
|
||||
if(!$output->toBool()) return new Object(-1, 'msg_error_occured');
|
||||
|
||||
// 첨부 파일 삭제
|
||||
|
|
@ -214,9 +208,8 @@
|
|||
if(!$oDocumentModel->isGranted($document_srl)) return new Object(-1, 'msg_not_permitted');
|
||||
|
||||
// 삭제
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteComments', $args);
|
||||
$output = executeQuery('comment.deleteComments', $args);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
@ -224,9 +217,8 @@
|
|||
* @brief 특정 모듈의 모든 댓글 삭제
|
||||
**/
|
||||
function deleteModuleComments($module_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srl = $module_srl;
|
||||
$output = $oDB->executeQuery('comment.deleteModuleComments', $args);
|
||||
$output = executeQuery('comment.deleteModuleComments', $args);
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,9 +26,8 @@
|
|||
* @brief 자식 답글의 갯수 리턴
|
||||
**/
|
||||
function getChildCommentCount($comment_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.getChildCommentCount', $args);
|
||||
$output = executeQuery('comment.getChildCommentCount', $args);
|
||||
return (int)$output->data->count;
|
||||
}
|
||||
|
||||
|
|
@ -36,10 +35,8 @@
|
|||
* @brief 댓글 가져오기
|
||||
**/
|
||||
function getComment($comment_srl, $is_admin = false) {
|
||||
// DB에서 가져옴
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srl = $comment_srl;
|
||||
$output = $oDB->executeQuery('comment.getComment', $args);
|
||||
$output = executeQuery('comment.getComment', $args);
|
||||
$comment = $output->data;
|
||||
|
||||
// 첨부파일 가져오기
|
||||
|
|
@ -62,9 +59,8 @@
|
|||
function getComments($comment_srl_list) {
|
||||
if(is_array($comment_srl_list)) $comment_srls = implode(',',$comment_srl_list);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$args->comment_srls = $comment_srls;
|
||||
$output = $oDB->executeQuery('comment.getComments', $args);
|
||||
$output = executeQuery('comment.getComments', $args);
|
||||
return $output->data;
|
||||
}
|
||||
|
||||
|
|
@ -72,9 +68,8 @@
|
|||
* @brief document_srl 에 해당하는 댓글의 전체 갯수를 가져옴
|
||||
**/
|
||||
function getCommentCount($document_srl) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = $oDB->executeQuery('comment.getCommentCount', $args);
|
||||
$output = executeQuery('comment.getCommentCount', $args);
|
||||
$total_count = $output->data->count;
|
||||
return (int)$total_count;
|
||||
}
|
||||
|
|
@ -83,11 +78,9 @@
|
|||
* @brief document_srl에 해당하는 문서의 댓글 목록을 가져옴
|
||||
**/
|
||||
function getCommentList($document_srl, $is_admin = false) {
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$args->document_srl = $document_srl;
|
||||
$args->list_order = 'list_order';
|
||||
$output = $oDB->executeQuery('comment.getCommentList', $args);
|
||||
$output = executeQuery('comment.getCommentList', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
$source_list= $output->data;
|
||||
|
|
@ -155,10 +148,6 @@
|
|||
* @brief 모든 댓글를 시간 역순으로 가져옴 (관리자용)
|
||||
**/
|
||||
function getTotalCommentList($obj) {
|
||||
|
||||
// DB 객체 생성
|
||||
$oDB = &DB::getInstance();
|
||||
|
||||
$query_id = 'comment.getTotalCommentList';
|
||||
|
||||
// 변수 설정
|
||||
|
|
@ -211,7 +200,7 @@
|
|||
}
|
||||
|
||||
// comment.getTotalCommentList 쿼리 실행
|
||||
$output = $oDB->executeQuery($query_id, $args);
|
||||
$output = executeQuery($query_id, $args);
|
||||
|
||||
// 결과가 없거나 오류 발생시 그냥 return
|
||||
if(!$output->toBool()||!count($output->data)) return $output;
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@
|
|||
if(!in_array($module_srl, $module_srl_list)) $module_srl_list[] = $module_srl;
|
||||
}
|
||||
if(count($module_srl_list)) {
|
||||
$oDB = &DB::getInstance();
|
||||
$args->module_srls = implode(',',$module_srl_list);
|
||||
$mid_output = $oDB->executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
$mid_output = executeQuery('module.getModuleInfoByModuleSrl', $args);
|
||||
if($mid_output->data && !is_array($mid_output->data)) $mid_output->data = array($mid_output->data);
|
||||
for($i=0;$i<count($mid_output->data);$i++) {
|
||||
$mid_info = $mid_output->data[$i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue