diff --git a/common/framework/UA.php b/common/framework/UA.php
index 14e14b87b..792845719 100644
--- a/common/framework/UA.php
+++ b/common/framework/UA.php
@@ -171,7 +171,7 @@ class UA
}
// Look for common search engine names and the 'bot' keyword.
- if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|wordpress|facebook|external(agent|fetcher)|teoma|yeti|daum|apachebench|googleother|mediapartners-google|[(<+]https?:|@/i', $ua))
+ if (preg_match('/bot|spider|crawler|archiver|wget|curl|php|slurp|wordpress|facebook|external(agent|fetcher)|teoma|yeti|daum\b|apachebench|googleother|mediapartners-google|[(<+]https?:|@/i', $ua))
{
return self::$_robot_cache[$ua] = true;
}
diff --git a/common/js/common.js b/common/js/common.js
index 7504be4ad..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,9 +1606,13 @@ 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);
}
- window.close();
+
+ // 딜레이 후 창 닫기
+ setTimeout(function() {
+ window.close();
+ }, 100);
}
/**
diff --git a/common/lang/en.php b/common/lang/en.php
index f584a15bf..cb88e734a 100644
--- a/common/lang/en.php
+++ b/common/lang/en.php
@@ -307,6 +307,7 @@ $lang->confirm_vote = 'Are you sure you want to upvote?';
$lang->confirm_delete = 'Are you sure you want to delete?';
$lang->confirm_restore = 'Are you sure you want to restore?';
$lang->confirm_move = 'Are you sure you want to move?';
+$lang->confirm_trash = 'Are you sure you want to move to trash?';
$lang->confirm_reset = 'Are you sure you want to reset?';
$lang->confirm_leave = 'Are you sure you want to delete your account?';
$lang->confirm_update = 'Are you sure you want to update?';
diff --git a/common/lang/ko.php b/common/lang/ko.php
index c32c5d1b6..8160ae986 100644
--- a/common/lang/ko.php
+++ b/common/lang/ko.php
@@ -307,6 +307,7 @@ $lang->confirm_vote = '추천하시겠습니까?';
$lang->confirm_delete = '삭제하시겠습니까?';
$lang->confirm_restore = '복원하시겠습니까?';
$lang->confirm_move = '이동하시겠습니까?';
+$lang->confirm_trash = '휴지통으로 이동하시겠습니까?';
$lang->confirm_reset = '초기화하시겠습니까?';
$lang->confirm_leave = '탈퇴하시겠습니까?';
$lang->confirm_update = '수정하시겠습니까?';
diff --git a/common/legacy.php b/common/legacy.php
index b6d962890..ba25076a4 100644
--- a/common/legacy.php
+++ b/common/legacy.php
@@ -875,6 +875,7 @@ function getDestroyXeVars($vars)
*/
function getNumberingPath($no, int $size = 3): string
{
+ $no = intval($no);
$mod = pow(10, $size);
$output = sprintf('%0' . $size . 'd/', intval($no % $mod));
if($no >= $mod)
diff --git a/modules/admin/tpl/_dashboard_counter.html b/modules/admin/tpl/_dashboard_counter.html
index 741c57441..507e193ba 100644
--- a/modules/admin/tpl/_dashboard_counter.html
+++ b/modules/admin/tpl/_dashboard_counter.html
@@ -10,7 +10,7 @@
- {$lang->menu_gnb['user']}:
- {number_format($status->member->totalCount)} (+{number_format($status->member->todayCount)})
- › {$lang->details}
+ {$lang->details}
{@ $dashboard_stack->left[] = ob_get_clean()}
@@ -23,7 +23,7 @@
- {$lang->menu_gnb_sub['document']}:
- {number_format($status->document->totalCount)} (+{number_format($status->document->todayCount)})
- › {$lang->details}
+ {$lang->details}
@@ -48,7 +48,7 @@
{$lang->no_data}
- › {$lang->more}
+ {$lang->more}
{@ $dashboard_stack->right[] = ob_get_clean()}
@@ -70,11 +70,13 @@
{$lang->no_data}
- › {$lang->more}
+ {$lang->more}
{@ $dashboard_stack->right[] = ob_get_clean()}
diff --git a/modules/admin/tpl/js/dashboard_default.js b/modules/admin/tpl/js/dashboard_default.js
index 1514d1c33..5fc24228c 100644
--- a/modules/admin/tpl/js/dashboard_default.js
+++ b/modules/admin/tpl/js/dashboard_default.js
@@ -10,4 +10,17 @@ $(function() {
$(this).removeClass('hover').find('>.action').hide();
}
});
+ var forms = $('.dashboard>div>section form.action');
+ forms.on('click', 'button', function(e) {
+ var title = $(this).closest('form').siblings('a').first().text();
+ var message;
+ if ($(this).val() === 'trash' || $(this).val() === 'true') {
+ message = xe.lang.confirm_trash;
+ } else {
+ message = xe.lang.confirm_delete;
+ }
+ if (!confirm(title + "\n" + message)) {
+ e.preventDefault();
+ }
+ });
});
diff --git a/modules/board/board.view.php b/modules/board/board.view.php
index f0800b926..eb40cd2b8 100644
--- a/modules/board/board.view.php
+++ b/modules/board/board.view.php
@@ -313,37 +313,34 @@ class BoardView extends Board
}
}
- // if the consultation function is enabled, and the document is not a notice
+ // if the consultation function is enabled, only the author can read the document.
if($this->consultation && !$oDocument->isNotice())
{
- $logged_info = Context::get('logged_info');
- if(abs($oDocument->get('member_srl')) != $logged_info->member_srl)
+ if (abs($oDocument->get('member_srl')) != $this->user->member_srl)
{
- $oDocument = DocumentModel::getDocument(0);
+ Context::set('document_srl', null, true);
+ $this->dispBoardMessage('msg_not_founded', 404);
}
}
- // if the document is TEMP saved, check Grant
+ // if the document is TEMP saved, pretend that it doesn't exist.
if($oDocument->getStatus() == 'TEMP')
{
- if(!$oDocument->isGranted())
- {
- $oDocument = DocumentModel::getDocument(0);
- }
+ Context::set('document_srl', null, true);
+ $this->dispBoardMessage('msg_not_founded', 404);
}
-
}
else
{
- // if the document is not existed, then alert a warning message
+ // if the document does not exist, then display a warning message.
Context::set('document_srl', null, true);
$this->dispBoardMessage('msg_not_founded', 404);
}
+ }
/**
* if the document is not existed, get an empty document
*/
- }
else
{
$oDocument = DocumentModel::getDocument(0);
@@ -351,7 +348,7 @@ class BoardView extends Board
}
/**
- *check the document view grant
+ * Check the document view grant
*/
if($oDocument->isExists())
{
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();
diff --git a/modules/file/file.controller.php b/modules/file/file.controller.php
index 4b4e7afcb..4cf42b266 100644
--- a/modules/file/file.controller.php
+++ b/modules/file/file.controller.php
@@ -1870,7 +1870,14 @@ class FileController extends File
foreach($source_file_list as $source_file)
{
- $this->copyFile($source_file, $module_srl, $upload_target_srl, $content);
+ $copied_file = $this->copyFile($source_file, $module_srl, $upload_target_srl, $content);
+ if ($source_file->cover_image == 'Y')
+ {
+ executeQuery('file.updateCoverImage', [
+ 'file_srl' => $copied_file->get('file_srl'),
+ 'cover_image' => 'Y',
+ ]);
+ }
}
}
diff --git a/tests/unit/framework/UATest.php b/tests/unit/framework/UATest.php
index a20ff65b0..ce4ba6921 100644
--- a/tests/unit/framework/UATest.php
+++ b/tests/unit/framework/UATest.php
@@ -40,6 +40,7 @@ class UATest extends \Codeception\Test\Unit
$this->assertTrue(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'));
$this->assertTrue(Rhymix\Framework\UA::isRobot('Googlebot/2.1 (+http://www.googlebot.com/bot.html)'));
$this->assertTrue(Rhymix\Framework\UA::isRobot('Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/)'));
+ $this->assertTrue(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (compatible; MSIE or Firefox mutant; not on Windows server;) Daum 4.1'));
$this->assertTrue(Rhymix\Framework\UA::isRobot('Random user agent (+https://url.com)'));
$this->assertTrue(Rhymix\Framework\UA::isRobot('facebookexternalhit/1.1'));
$this->assertTrue(Rhymix\Framework\UA::isRobot('meta-externalfetcher/1.1'));
@@ -49,6 +50,7 @@ class UATest extends \Codeception\Test\Unit
// Not robot
$this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25'));
$this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25'));
+ $this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (Linux; Android 15; SM-XXX Build/AAAA; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/143.0.0.0 Mobile Safari/537.36 DaumApps/8.0.0 DaumDevice/mobile'));
$this->assertFalse(Rhymix\Framework\UA::isRobot('Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko'));
}