mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Fix #2238 add option to control whether to allow redeclaring documents
This commit is contained in:
parent
087b2587bf
commit
fa756b5169
7 changed files with 37 additions and 7 deletions
|
|
@ -113,7 +113,15 @@ class DocumentAdminController extends Document
|
|||
$args = new stdClass();
|
||||
$args->document_srl = $document_srl;
|
||||
$output = executeQuery('document.deleteDeclaredDocuments', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
$output = executeQuery('document.deleteDocumentDeclaredLog', $args);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3276,7 +3276,14 @@ class DocumentController extends Document
|
|||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
if(Context::get('prevent_redeclare') !== 'Y')
|
||||
{
|
||||
$output = executeQuery('document.deleteDocumentDeclaredLog', $args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
$obj->return_message = 'success_declare_canceled';
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -124,3 +124,4 @@ $lang->allow_declare_from_same_ip = '동일 IP 신고 허용';
|
|||
$lang->allow_declare_cancel = '신고 취소 허용';
|
||||
$lang->cmd_search_division = '검색 결과 분할';
|
||||
$lang->about_search_division = '검색 소요시간과 서버 부하를 줄이기 위해 일정 갯수만큼 끊어서 검색합니다. 0으로 설정할 경우 분할하지 않습니다.<br />분할하지 않거나 지나치게 많은 게시물을 한 번에 검색하려고 하면 타임아웃, 서버 다운 등 심각한 부작용이 발생할 수 있으므로 5000~10000 내외를 권장합니다.';
|
||||
$lang->prevent_redeclare = '같은 사용자가 이 게시물을 다시 신고하는 것을 방지합니다.';
|
||||
|
|
|
|||
3
modules/document/tpl/css/document_admin.css
Normal file
3
modules/document/tpl/css/document_admin.css
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.x_modal-body:not(.showTree) .moveTree {
|
||||
display: none;
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
|
||||
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||
</script>
|
||||
<load target="js/document_admin.js" />
|
||||
<include target="header.html" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/declared_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
|
|
@ -18,7 +17,7 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<i>|</i>
|
||||
<a href="{getUrl('act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'Y')}">{$status_name_list['SECRET']}</a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
|
||||
<a href="{getUrl('act', 'dispDocumentAdminList', 'search_target', 'is_secret', 'search_keyword', 'temp')}">{$status_name_list['TEMP']}</a>
|
||||
<i>|</i>
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminDeclared')}" class="active"|cond="$act == 'dispDocumentAdminDeclared'">{$lang->cmd_declared_list}({number_format($total_count)})</a>
|
||||
|
||||
|
|
@ -135,6 +134,12 @@ xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
|||
<label for="message">{$lang->message_notice}</label>
|
||||
<textarea rows="4" cols="42" name="message_content" id="message" style="width:100%"></textarea>
|
||||
</div>
|
||||
<div class="prevent_redeclare">
|
||||
<label for="prevent_redeclare">
|
||||
<input type="checkbox" id="prevent_redeclare" name="prevent_redeclare" value="Y" checked="checked" />
|
||||
{$lang->prevent_redeclare}
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
<section class="moveTree">
|
||||
<h1>{$lang->msg_select_menu}</h1>
|
||||
|
|
@ -179,7 +184,7 @@ jQuery(function($){
|
|||
$modalBody.removeClass('showTree');
|
||||
} else if(thisValue == 'move' || thisValue == 'copy') {
|
||||
$.xeShowMenuSelectorIn($('._menuSelector'));
|
||||
|
||||
|
||||
$modalBody.addClass('showTree');
|
||||
$tree = $('._menuSelector .tree');
|
||||
$tree.bind('select_node.jstree', function(a,b){
|
||||
|
|
@ -196,7 +201,12 @@ jQuery(function($){
|
|||
$('#manageForm input[name=module_srl]').val('');
|
||||
});
|
||||
}
|
||||
if (thisValue == 'cancelDeclare') {
|
||||
$modalBody.find('.prevent_redeclare').show();
|
||||
} else {
|
||||
$modalBody.find('.prevent_redeclare').hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
xe.lang.msg_empty_search_target = '{$lang->msg_empty_search_target}';
|
||||
xe.lang.msg_empty_search_keyword = '{$lang->msg_empty_search_keyword}';
|
||||
</script>
|
||||
<load target="js/document_admin.js" />
|
||||
<include target="header.html" />
|
||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/document/tpl/document_list/1'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<load target="css/document_admin.css" />
|
||||
<load target="js/document_admin.js" />
|
||||
|
||||
<div class="x_page-header">
|
||||
<h1>{$lang->document}</h1>
|
||||
</div>
|
||||
|
||||
<ul class="x_nav x_nav-tabs">
|
||||
<li class="x_active"|cond="$act == 'dispDocumentAdminList'">
|
||||
<a href="{getUrl('', 'module', 'admin', 'act', 'dispDocumentAdminList')}">{$lang->document_list}</a>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue