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

This commit is contained in:
zero 2007-03-30 05:11:53 +00:00
parent 166e3249e7
commit 11b83459b0
18 changed files with 154 additions and 151 deletions

View file

@ -11,6 +11,11 @@
* @brief 설치시 추가 작업이 필요할시 구현
**/
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
$oModuleController = &getController('module');
$oModuleController->insertActionFoward('comment', 'view', 'dispCommentAdminList');
$oModuleController->insertActionFoward('comment', 'controller', 'procCommentAdminDeleteChecked');
return new Object();
}

View file

@ -13,6 +13,29 @@
function init() {
}
/**
* @brief 관리자 페이지에서 선택된 댓글들을 삭제
**/
function procCommentAdminDeleteChecked() {
// 선택된 글이 없으면 오류 표시
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$comment_srl_list= explode('|@|', $cart);
$comment_count = count($comment_srl_list);
if(!$comment_count) return $this->stop('msg_cart_is_null');
// 글삭제
for($i=0;$i<$comment_count;$i++) {
$comment_srl = trim($comment_srl_list[$i]);
if(!$comment_srl) continue;
$this->deleteComment($comment_srl, true);
}
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
}
/**
* @brief 코멘트의 권한 부여
* 세션값으로 접속상태에서만 사용 가능
@ -206,27 +229,5 @@
$output = $oDB->executeQuery('comment.deleteModuleComments', $args);
return $output;
}
/**
* @brief 관리자 페이지에서 선택된 댓글들을 삭제
**/
function procDeleteChecked() {
// 선택된 글이 없으면 오류 표시
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$comment_srl_list= explode('|@|', $cart);
$comment_count = count($comment_srl_list);
if(!$comment_count) return $this->stop('msg_cart_is_null');
// 글삭제
for($i=0;$i<$comment_count;$i++) {
$comment_srl = trim($comment_srl_list[$i]);
if(!$comment_srl) continue;
$this->deleteComment($comment_srl, true);
}
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
}
}
?>

View file

@ -16,7 +16,7 @@
/**
* @brief 목록 출력 (관리자용)
**/
function dispList() {
function dispCommentAdminList() {
// 목록을 구하기 위한 옵션
$args->page = Context::get('page'); ///< 페이지
$args->list_count = 50; ///< 한페이지에 보여줄 글 수

View file

@ -1,11 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<module version="0.1">
<title xml:lang="ko">댓글</title>
<title xml:lang="en">comment</title>
<author email_address="zero@zeroboard.com" link="http://www.zeroboard.com" date="2007. 2. 28">
<name xml:lang="ko">제로</name>
<name xml:lang="en">zero</name>
<description xml:lang="ko">댓글 모듈</description>
<description xml:lang="en">comment</description>
<description xml:lang="ko">게시판이나 블로그등의 댓글을 관리하는 모듈입니다.</description>
</author>
</module>

View file

@ -2,7 +2,7 @@
<module>
<grants />
<actions>
<action name="dispList" type="view" admin_index="true" standalone="true" />
<action name="procDeleteChecked" type="controller" standalone="true" />
<action name="dispCommentAdminList" type="view" admin_index="true" standalone="true" />
<action name="procCommentAdminDeleteChecked" type="controller" standalone="true" />
</actions>
</module>