diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 0c5ac0b6f..00b4d42ae 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -96,6 +96,20 @@ $args->sort_index = Context::get('sort_index'); $args->order_type = Context::get('order_type'); + // 스킨에서 설정한 기본 정렬 대상을 구함 + if(!$args->sort_index) { + switch($this->module_info->order_target) { + case "updated" : + $args->sort_index = "update_order"; + $args->order_type = "asc"; + break; + default : + $args->sort_index = "list_order"; + $args->order_type = "asc"; + break; + } + } + // 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다) $output = $oDocumentModel->getDocumentList($args); diff --git a/modules/board/skins/xe_gallery/skin.xml b/modules/board/skins/xe_gallery/skin.xml index 973446d1c..a9034bc7d 100644 --- a/modules/board/skins/xe_gallery/skin.xml +++ b/modules/board/skins/xe_gallery/skin.xml @@ -23,6 +23,15 @@ + + 정렬 대상 + 排列顺序 + select + 등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다. + 可排序文章的顺序。 + newest + updated + 게시판 제목 board标题 diff --git a/modules/board/skins/xe_list/skin.xml b/modules/board/skins/xe_list/skin.xml index a8c4f58d2..bdd1c76c8 100644 --- a/modules/board/skins/xe_list/skin.xml +++ b/modules/board/skins/xe_list/skin.xml @@ -23,6 +23,15 @@ + + 정렬 대상 + 排列顺序 + select + 등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다. + 可排序文章的顺序。 + newest + updated + 게시판 제목 board 标题 diff --git a/modules/board/skins/xe_webzine/list.html b/modules/board/skins/xe_webzine/list.html index 39ca07f9c..050fb85de 100644 --- a/modules/board/skins/xe_webzine/list.html +++ b/modules/board/skins/xe_webzine/list.html @@ -97,8 +97,8 @@ - {$no} + {$no} @@ -138,7 +138,7 @@ {$document->getRegdate('Y-m-d')} - {$document->getSummary(140)} + {$document->getSummary(140)} diff --git a/modules/board/skins/xe_webzine/skin.xml b/modules/board/skins/xe_webzine/skin.xml index 0945a710c..1cfe9b935 100644 --- a/modules/board/skins/xe_webzine/skin.xml +++ b/modules/board/skins/xe_webzine/skin.xml @@ -23,6 +23,15 @@ + + 정렬 대상 + 排列顺序 + select + 등록된 순서 또는 변경된 순서로 정렬을 할 수 있습니다. + 可排序文章的顺序。 + newest + updated + 게시판 제목 board 标题 diff --git a/modules/comment/comment.controller.php b/modules/comment/comment.controller.php index 4596b8831..7fb595712 100644 --- a/modules/comment/comment.controller.php +++ b/modules/comment/comment.controller.php @@ -86,7 +86,7 @@ $oDocumentController = &getController('document'); // 해당글의 댓글 수를 업데이트 - $output = $oDocumentController->updateCommentCount($document_srl, $comment_count); + $output = $oDocumentController->updateCommentCount($document_srl, $comment_count, true); // 댓글의 권한을 부여 $this->addGrant($obj->comment_srl); diff --git a/modules/document/document.controller.php b/modules/document/document.controller.php index 0be473176..c3d01f884 100644 --- a/modules/document/document.controller.php +++ b/modules/document/document.controller.php @@ -378,10 +378,12 @@ /** * @brief 해당 document의 댓글 수 증가 **/ - function updateCommentCount($document_srl, $comment_count) { + function updateCommentCount($document_srl, $comment_count, $comment_inserted = false) { $args->document_srl = $document_srl; $args->comment_count = $comment_count; + if($comment_inserted) $args->update_order = -1*getNextSequence(); + return executeQuery('document.updateCommentCount', $args); } diff --git a/modules/document/queries/updateCommentCount.xml b/modules/document/queries/updateCommentCount.xml index aef4a3556..67483ee63 100644 --- a/modules/document/queries/updateCommentCount.xml +++ b/modules/document/queries/updateCommentCount.xml @@ -4,6 +4,7 @@ +