From 301861e35a69a6bf6db786ee99495dd9845ca4a8 Mon Sep 17 00:00:00 2001 From: BJRambo Date: Fri, 26 Feb 2016 13:35:41 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=EA=B8=80=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=EC=8B=9C=EC=97=90=20=EC=9B=90=EB=B3=B8=EA=B8=80?= =?UTF-8?q?=EC=9D=84=20=EB=93=B1=EB=A1=9D=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/board/board.controller.php | 10 ++++----- modules/board/lang/ko.php | 3 ++- modules/document/document.controller.php | 27 ++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 40fa93cd1..f84555fbd 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -106,6 +106,11 @@ class boardController extends board } } + if($this->module_info->update_log == 'Y') + { + $obj->update_log_setting = 'Y'; + } + // update the document if it is existed if($is_update) { @@ -147,11 +152,6 @@ class boardController extends board $obj->update_order = $obj->list_order = (getNextSequence() * -1); } - if($this->module_info->update_log == 'Y') - { - $obj->update_log_setting = 'Y'; - } - $output = $oDocumentController->updateDocument($oDocument, $obj); $msg_code = 'success_updated'; diff --git a/modules/board/lang/ko.php b/modules/board/lang/ko.php index cc9b914c7..91060481e 100644 --- a/modules/board/lang/ko.php +++ b/modules/board/lang/ko.php @@ -54,4 +54,5 @@ $lang->msg_admin_comment_no_modify = '최고관리자의 댓글을 수정할 권 $lang->msg_board_delete_protect_comment = '댓글이 작성된 댓글의 글을 삭제할 수 없습니다.'; $lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.'; $lang->msg_protect_regdate_document = '%s일 이전의 게시글은 수정 또는 삭제 할 수 없습니다.'; -$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.'; \ No newline at end of file +$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.'; +$lang->original_letter = '원본글'; \ No newline at end of file diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 040891fad..31ce0a961 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -438,6 +438,33 @@ class documentController extends document $oDB->rollback(); return $output; } + // update Document Log + else + { + if($obj->update_log_setting === 'Y') + { + $update_args = new stdClass(); + $update_args->category_srl = $obj->category_srl; + $update_args->document_srl = $obj->document_srl; + $update_args->member_srl = $obj->member_srl; + $update_args->module_srl = $obj->module_srl; + $update_args->update_member_srl = $logged_info->member_srl; + $update_args->nick_name = $obj->nick_name; + $update_args->title = $obj->title; + $update_args->title_bold = $obj->title_bold; + $update_args->title_color = $obj->title_color; + $update_args->content = $obj->content.'

'.Context::getLang('original_letter'); + $update_args->update_nick_name = $logged_info->nick_name; + $update_args->tags = $obj->tags; + $update_args->extra_vars = $obj->extra_vars; + $update_output = executeQuery('document.insertDocumentUpdateLog', $update_args); + if(!$update_output->toBool()) + { + $oDB->rollback(); + return $update_output; + } + } + } // Insert extra variables if the document successfully inserted. $extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl); if(count($extra_keys))