rhymix/modules/comment/comment.admin.controller.php
zero 8326004cb2 삭제
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2327 201d5d3c-b55e-5fd7-737f-ddc643e51545
2007-08-12 03:59:52 +00:00

52 lines
1.6 KiB
PHP

<?php
/**
* @class commentAdminController
* @author zero (zero@nzeo.com)
* @brief comment 모듈의 admin controller class
**/
class commentAdminController extends comment {
/**
* @brief 초기화
**/
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');
$oCommentController = &getController('comment');
// 글삭제
for($i=0;$i<$comment_count;$i++) {
$comment_srl = trim($comment_srl_list[$i]);
if(!$comment_srl) continue;
$output = $oCommentController->deleteComment($comment_srl, true);
if(!$output->toBool()) return $output;
}
$this->setMessage( sprintf(Context::getLang('msg_checked_comment_is_deleted'), $comment_count) );
}
/**
* @brief 특정 모듈의 모든 댓글 삭제
**/
function deleteModuleComments($module_srl) {
$args->module_srl = $module_srl;
$output = executeQuery('comment.deleteModuleComments', $args);
return $output;
}
}
?>