mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
게시글 등록시에 원본글을 등록하도록 개선
This commit is contained in:
parent
9a60af1871
commit
301861e35a
3 changed files with 34 additions and 6 deletions
|
|
@ -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
|
// update the document if it is existed
|
||||||
if($is_update)
|
if($is_update)
|
||||||
{
|
{
|
||||||
|
|
@ -147,11 +152,6 @@ class boardController extends board
|
||||||
$obj->update_order = $obj->list_order = (getNextSequence() * -1);
|
$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);
|
$output = $oDocumentController->updateDocument($oDocument, $obj);
|
||||||
$msg_code = 'success_updated';
|
$msg_code = 'success_updated';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,3 +55,4 @@ $lang->msg_board_delete_protect_comment = '댓글이 작성된 댓글의 글을
|
||||||
$lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.';
|
$lang->msg_board_update_protect_comment = '댓글이 작성된 댓글의 글을 수정할 수 없습니다.';
|
||||||
$lang->msg_protect_regdate_document = '%s일 이전의 게시글은 수정 또는 삭제 할 수 없습니다.';
|
$lang->msg_protect_regdate_document = '%s일 이전의 게시글은 수정 또는 삭제 할 수 없습니다.';
|
||||||
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
|
$lang->msg_protect_regdate_comment = '%s일 이전의 댓글은 수정 또는 삭제 할 수 없습니다.';
|
||||||
|
$lang->original_letter = '원본글';
|
||||||
|
|
@ -438,6 +438,33 @@ class documentController extends document
|
||||||
$oDB->rollback();
|
$oDB->rollback();
|
||||||
return $output;
|
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.'<br><br>'.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.
|
// Insert extra variables if the document successfully inserted.
|
||||||
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
$extra_keys = $oDocumentModel->getExtraKeys($obj->module_srl);
|
||||||
if(count($extra_keys))
|
if(count($extra_keys))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue