From c7dca3008a270d2a8a5f88ae3b79d9d0a0e17466 Mon Sep 17 00:00:00 2001 From: bnu Date: Tue, 8 Mar 2016 16:23:20 +0900 Subject: [PATCH] =?UTF-8?q?fix=20#1868=20=EC=9E=84=EC=8B=9C=EC=A0=80?= =?UTF-8?q?=EC=9E=A5=20=EA=B8=80=EC=9D=84=20=EB=B6=88=EB=9F=AC=EC=99=80=20?= =?UTF-8?q?=EB=93=B1=EB=A1=9D=20=EC=8B=9C=20=EC=9D=B5=EB=AA=85=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=EC=9E=84=EC=97=90=EB=8F=84=20=EC=9E=91=EC=84=B1?= =?UTF-8?q?=EC=9E=90=EC=9D=98=20=EC=A0=95=EB=B3=B4=EA=B0=80=20=EC=9E=85?= =?UTF-8?q?=EB=A0=A5/=EB=85=B8=EC=B6=9C=EB=90=98=EB=8A=94=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EA=B3=A0=EC=B9=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conflicts: modules/board/board.controller.php modules/document/document.controller.php --- modules/board/board.controller.php | 7 ++++++- modules/document/document.controller.php | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/modules/board/board.controller.php b/modules/board/board.controller.php index 8ebe76c96..70390ebf0 100644 --- a/modules/board/board.controller.php +++ b/modules/board/board.controller.php @@ -127,6 +127,11 @@ class boardController extends board } } + if($this->module_info->use_anonymous == 'Y') { + $obj->member_srl = $oDocument->get('member_srl') * -1; + $oDocument->add('member_srl', $obj->member_srl); + } + if($this->module_info->protect_document_regdate > 0 && $this->grant->manager == false) { if($oDocument->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day'))) @@ -152,7 +157,7 @@ class boardController extends board $obj->update_order = $obj->list_order = (getNextSequence() * -1); } $obj->reason_update = escape($obj->reason_update); - $output = $oDocumentController->updateDocument($oDocument, $obj); + $output = $oDocumentController->updateDocument($oDocument, $obj, true); $msg_code = 'success_updated'; // insert a new document otherwise diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 81d2685b4..eb59687f8 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -607,8 +607,9 @@ class documentController extends document { $obj->password = getModel('member')->hashPassword($obj->password); } + // If an author is identical to the modifier or history is used, use the logged-in user's information. - if(Context::get('is_logged') && $module_info->use_anonymous != 'Y') + if(Context::get('is_logged') && !$manual_updated && $module_info->use_anonymous != 'Y') { $logged_info = Context::get('logged_info'); if($source_obj->get('member_srl')==$logged_info->member_srl) @@ -620,6 +621,7 @@ class documentController extends document $obj->homepage = $logged_info->homepage; } } + // For the document written by logged-in user however no nick_name exists if($source_obj->get('member_srl')&& !$obj->nick_name) {