From 70a25057f0b21dacf849430e65b2e61a35917198 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 28 Jan 2026 21:04:12 +0900 Subject: [PATCH] Fix incorrect redirect when loading saved document from another module #2659 --- common/js/common.js | 8 ++++++-- modules/document/tpl/saved_list_popup.html | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/common/js/common.js b/common/js/common.js index 2d8f3c34e..9103e5eed 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -1580,9 +1580,10 @@ function doDocumentLoad(obj) { * * @param int document_srl * @param string module + * @param string mid * @return void */ -function doDocumentSelect(document_srl, module) { +function doDocumentSelect(document_srl, module, mid) { if (!opener) { window.close(); return; @@ -1590,6 +1591,9 @@ function doDocumentSelect(document_srl, module) { if (module === undefined) { module = 'document'; } + if (mid === undefined) { + mid = current_mid; + } // 게시글을 가져와서 등록하기 if (module === 'page') { @@ -1602,7 +1606,7 @@ function doDocumentSelect(document_srl, module) { } opener.location.href = url; } else { - opener.location.href = opener.current_url.setQuery('act', 'dispBoardWrite').setQuery('document_srl', document_srl); + opener.location.href = opener.current_url.setQuery('mid', mid).setQuery('act', 'dispBoardWrite').setQuery('document_srl', document_srl); } // 딜레이 후 창 닫기 diff --git a/modules/document/tpl/saved_list_popup.html b/modules/document/tpl/saved_list_popup.html index 8ac7d1bd1..2d58c2756 100644 --- a/modules/document/tpl/saved_list_popup.html +++ b/modules/document/tpl/saved_list_popup.html @@ -11,6 +11,7 @@ {$lang->title} + {$lang->module} {$lang->date} {$lang->cmd_select} {$lang->cmd_delete} @@ -22,8 +23,9 @@ {$val->getTitle()} + {$val->getModuleName()} {$val->getRegdate("Y-m-d H:i:s")} - {$lang->cmd_select} + {$lang->cmd_select} {$lang->cmd_delete} @@ -61,7 +63,8 @@ event.preventDefault(); var document_srl = $(this).data('documentSrl'); var document_type = $(this).data('documentType'); - doDocumentSelect(document_srl, document_type); + var document_mid = $(this).data('documentMid'); + doDocumentSelect(document_srl, document_type, document_mid); }); $('.btn_delete_temp_saved').on('click', function(event) { event.preventDefault();