From 07223839172f182252491cb42a22f651846dda63 Mon Sep 17 00:00:00 2001 From: zero Date: Fri, 20 Jul 2007 02:24:40 +0000 Subject: [PATCH] =?UTF-8?q?=EB=B8=94=EB=A1=9C=EA=B7=B8=EC=9D=98=20?= =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=84=B1=EA=B3=B5=EC=8B=9C=20=EC=9E=90?= =?UTF-8?q?=EB=B0=94=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=EB=A1=9C=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9D=B4=EB=8F=99=ED=95=A0?= =?UTF-8?q?=EB=95=8C=20=EC=9D=B4=EB=8F=99=EC=9D=B4=20=EC=97=86=EB=8D=98=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= 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@1970 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/blog/blog.controller.php | 8 +++----- modules/blog/skins/default/js/blog.js | 5 ++++- modules/blog/skins/xe_blog/js/blog.js | 5 ++++- modules/blog/tpl/blog_info.html | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/blog/blog.controller.php b/modules/blog/blog.controller.php index 42a723be4..5f0640962 100644 --- a/modules/blog/blog.controller.php +++ b/modules/blog/blog.controller.php @@ -105,9 +105,6 @@ // comment 모듈의 controller 객체 생성 $oCommentController = &getController('comment'); - // comment_srl이 존재하는지 체크 - $comment = $oCommentModel->getComment($obj->comment_srl, $this->grant->manager); - // 줄바꾸임나 태그제거등의 작업 $obj->content = nl2br(strip_tags($obj->content)); @@ -144,10 +141,11 @@ if(!$output->toBool()) return $output; - $this->setMessage('success_registed'); $this->add('mid', Context::get('mid')); $this->add('document_srl', $obj->document_srl); - $this->add('comment_srl', $comment_srl); + $this->add('comment_srl', $obj->comment_srl); + + $this->setMessage('success_registed'); } /** diff --git a/modules/blog/skins/default/js/blog.js b/modules/blog/skins/default/js/blog.js index d57637070..8e1abe354 100644 --- a/modules/blog/skins/default/js/blog.js +++ b/modules/blog/skins/default/js/blog.js @@ -51,9 +51,12 @@ function completeReload(ret_obj) { function completeInsertComment(ret_obj) { var error = ret_obj['error']; var message = ret_obj['message']; + var comment_srl = ret_obj['comment_srl']; alert(message); - location.href = current_url.setQuery('comment_srl','').setQuery('act',''); + var url = current_url.setQuery('comment_srl','').setQuery('act','').setQuery('rnd',comment_srl); + if(comment_srl) url += '#comment_'+comment_srl; + location.href = url; } /* 댓글 삭제 */ diff --git a/modules/blog/skins/xe_blog/js/blog.js b/modules/blog/skins/xe_blog/js/blog.js index dba8c67a6..01ef837d7 100644 --- a/modules/blog/skins/xe_blog/js/blog.js +++ b/modules/blog/skins/xe_blog/js/blog.js @@ -57,9 +57,12 @@ function doCommentSubmit() { function completeInsertComment(ret_obj) { var error = ret_obj['error']; var message = ret_obj['message']; + var comment_srl = ret_obj['comment_srl']; alert(message); - location.href = current_url.setQuery('comment_srl','').setQuery('act',''); + var url = current_url.setQuery('comment_srl','').setQuery('act','').setQuery('rnd',comment_srl); + if(comment_srl) url += '#comment_'+comment_srl; + location.href = url; } /* 댓글 삭제 */ diff --git a/modules/blog/tpl/blog_info.html b/modules/blog/tpl/blog_info.html index ff73380b5..598db1048 100644 --- a/modules/blog/tpl/blog_info.html +++ b/modules/blog/tpl/blog_info.html @@ -56,4 +56,4 @@ {$lang->cmd_blog_list} - +