1. 로그인 접속자 위젯의 이름 클릭시 # 속성으로 스크롤업되는 문제 수정

2. 문서 모듈 설정의 휴지통 TAB 잘못된 태그 수정
3. 익명 게시판 기능 추가


git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5921 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-03-20 08:54:54 +00:00
parent d807512aca
commit 46bb24295c
18 changed files with 71 additions and 8 deletions

View file

@ -45,6 +45,12 @@
// 이미 존재하는 글인지 체크
$oDocument = $oDocumentModel->getDocument($obj->document_srl, $this->grant->manager);
// 익명 설정일 경우 여러가지 요소를 미리 제거 (알림용 정보들 제거)
if($this->module_info->use_anonymous == 'Y') {
$obj->notify_message = 'N';
$this->module_info->admin_mail = '';
}
// 이미 존재하는 경우 수정
if($oDocument->isExists() && $oDocument->document_srl == $obj->document_srl) {
$output = $oDocumentController->updateDocument($oDocument, $obj);
@ -76,6 +82,18 @@
// 오류 발생시 멈춤
if(!$output->toBool()) return $output;
// 익명 사용시 글의 글쓴이 정보를 모두 제거
if($this->module_info->use_anonymous == 'Y' && Context::get('is_logged')) {
$logged_info = Context::get('logged_info');
$oDocument = $oDocumentModel->getDocument($output->get('document_srl'));
$obj = $oDocument->getObjectVars();
$obj->member_srl = -1*$logged_info->member_srl;
$obj->email_address = $obj->homepage = $obj->user_id = '';
$obj->user_name = $obj->nick_name = 'anonymous';
$output = executeQuery('document.updateDocument', $obj);
if(!$output->toBool()) return $output;
}
// 결과를 리턴
$this->add('mid', Context::get('mid'));
$this->add('document_srl', $output->get('document_srl'));
@ -134,6 +152,12 @@
$oDocument = $oDocumentModel->getDocument($obj->document_srl);
if(!$oDocument->isExists()) return new Object(-1,'msg_not_permitted');
// 익명 설정일 경우 여러가지 요소를 미리 제거 (알림용 정보들 제거)
if($this->module_info->use_anonymous == 'Y') {
$obj->notify_message = 'N';
$this->module_info->admin_mail = '';
}
// comment 모듈의 model 객체 생성
$oCommentModel = &getModel('comment');
@ -141,8 +165,8 @@
$oCommentController = &getController('comment');
// comment_srl이 존재하는지 체크
// 만일 comment_srl이 n/a라면 getNextSequence()로 값을 얻어온다.
if(!$obj->comment_srl) {
// 만일 comment_srl이 n/a라면 getNextSequence()로 값을 얻어온다.
if(!$obj->comment_srl) {
$obj->comment_srl = getNextSequence();
} else {
$comment = $oCommentModel->getComment($obj->comment_srl, $this->grant->manager);
@ -185,9 +209,20 @@
$output = $oCommentController->updateComment($obj, $this->grant->manager);
$comment_srl = $obj->comment_srl;
}
if(!$output->toBool()) return $output;
// 익명 사용시 글의 글쓴이 정보를 모두 제거
if($this->module_info->use_anonymous == 'Y' && Context::get('is_logged')) {
$logged_info = Context::get('logged_info');
$comment = $oCommentModel->getComment($output->get('comment_srl'), $this->grant->manager);
$obj = $comment->getObjectVars();
$obj->member_srl = -1*$logged_info->member_srl;
$obj->email_address = $obj->homepage = $obj->user_id = '';
$obj->user_name = $obj->nick_name = 'anonymous';
$output = executeQuery('comment.updateComment', $obj);
if(!$output->toBool()) return $output;
}
$this->setMessage('success_registed');
$this->add('mid', Context::get('mid'));
$this->add('document_srl', $obj->document_srl);