From 89d40258bd09c8c9032a156cd8ef91dda3e50200 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 13 Jul 2007 04:26:06 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EB=AA=A8?= =?UTF-8?q?=EB=93=88=EC=97=90=20=EC=B5=9C=EC=8B=A0=EC=88=9C/=EC=97=85?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=8A=B8=20=EC=88=9C=20=EC=88=9C=EC=84=9C?= =?UTF-8?q?=EB=A5=BC=20=EC=A0=95=ED=95=A0=20=EC=88=98=20=EC=9E=88=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80=ED=95=98?= =?UTF-8?q?=EA=B3=A0=20xe=EC=8B=9C=EB=A6=AC=EC=A6=88=EC=9D=98=20=EC=8A=A4?= =?UTF-8?q?=ED=82=A8=EC=97=90=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/trunk@1924 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/board/board.view.php | 14 ++++++++++++++ modules/board/skins/xe_gallery/skin.xml | 9 +++++++++ modules/board/skins/xe_list/skin.xml | 9 +++++++++ modules/board/skins/xe_webzine/list.html | 4 ++-- modules/board/skins/xe_webzine/skin.xml | 9 +++++++++ modules/comment/comment.controller.php | 2 +- modules/document/document.controller.php | 4 +++- modules/document/queries/updateCommentCount.xml | 1 + 8 files changed, 48 insertions(+), 4 deletions(-) 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 @@ +