mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
Merge branch 'develop' into next
This commit is contained in:
commit
5047c39bcf
5 changed files with 40 additions and 16 deletions
|
|
@ -286,6 +286,15 @@ class boardController extends board
|
|||
}
|
||||
|
||||
$oDocument = DocumentModel::getDocument($document_srl);
|
||||
if (!$oDocument || !$oDocument->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
if (!$oDocument->isGranted())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
// check protect content
|
||||
if($this->module_info->protect_content == 'Y' || $this->module_info->protect_delete_content == 'Y')
|
||||
{
|
||||
|
|
@ -307,9 +316,6 @@ class boardController extends board
|
|||
// generate document module controller object
|
||||
$oDocumentController = getController('document');
|
||||
if($this->module_info->trash_use == 'Y')
|
||||
{
|
||||
// move the trash
|
||||
if($oDocument->isGranted() === true)
|
||||
{
|
||||
$output = $oDocumentController->moveDocumentToTrash($oDocument);
|
||||
if(!$output->toBool())
|
||||
|
|
@ -317,7 +323,6 @@ class boardController extends board
|
|||
return $output;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// delete the document
|
||||
|
|
@ -526,11 +531,11 @@ class boardController extends board
|
|||
}
|
||||
|
||||
$comment = CommentModel::getComment($comment_srl, $this->grant->manager);
|
||||
if(!$comment->isExists())
|
||||
if (!$comment || !$comment->isExists())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
if(!$comment->isGranted())
|
||||
if (!$comment->isGranted())
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
|
@ -544,6 +549,7 @@ class boardController extends board
|
|||
throw new Rhymix\Framework\Exception('msg_board_delete_protect_comment');
|
||||
}
|
||||
}
|
||||
|
||||
if($this->module_info->protect_comment_regdate > 0 && $this->grant->manager == false)
|
||||
{
|
||||
if($comment->get('regdate') < date('YmdHis', strtotime('-'.$this->module_info->protect_document_regdate.' day')))
|
||||
|
|
|
|||
|
|
@ -875,6 +875,15 @@ class commentController extends comment
|
|||
{
|
||||
return new BaseObject(-1, 'msg_invalid_request');
|
||||
}
|
||||
$comment = getModel('comment')->getComment($obj->comment_srl);
|
||||
if(!$comment->isExists())
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_founded');
|
||||
}
|
||||
if(!$is_admin && !$comment->isGranted())
|
||||
{
|
||||
return new BaseObject(-1, 'msg_not_permitted');
|
||||
}
|
||||
|
||||
// call a trigger (before)
|
||||
$output = ModuleHandler::triggerCall('comment.deleteComment', 'before', $comment);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ $lang->search_target_list['last_update'] = 'Last update';
|
|||
$lang->search_target_list['ipaddress'] = 'IP Address';
|
||||
$lang->search_target_list['is_secret'] = 'Status';
|
||||
$lang->no_text_comment = 'No text in this comment.';
|
||||
$lang->no_text_document = 'No text in this document.';
|
||||
$lang->secret_name_list['Y'] = 'Secret';
|
||||
$lang->secret_name_list['N'] = 'Public';
|
||||
$lang->published_name_list[0] = 'Waiting';
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ $lang->search_target_list['last_update'] = '최근수정일 ';
|
|||
$lang->search_target_list['ipaddress'] = 'IP 주소';
|
||||
$lang->search_target_list['is_secret'] = '상태';
|
||||
$lang->no_text_comment = '글자가 없는 댓글입니다.';
|
||||
$lang->no_text_document = '글자가 없는 게시글입니다.';
|
||||
$lang->secret_name_list['Y'] = '비밀';
|
||||
$lang->secret_name_list['N'] = '공개';
|
||||
$lang->published_name_list[0] = '대기';
|
||||
|
|
|
|||
|
|
@ -54,13 +54,20 @@ var no_text_comment = '{$lang->no_text_comment}';
|
|||
<tr loop="$trash_list => $no, $oTrashVO">
|
||||
<td class="nowr"><!--@if($oTrashVO->getOriginModule() == 'document')-->{$lang->document}<!--@else-->{$lang->comment}<!--@end--></td>
|
||||
<td class="title">
|
||||
<strong cond="!trim($oTrashVO->getTitle()) && $oTrashVO->getOriginModule() == 'comment'">{$lang->no_text_comment}</strong>
|
||||
<block cond="trim($oTrashVO->getTitle())">
|
||||
<block cond="isset($module_list[$oTrashVO->unserializedObject['module_srl']])">
|
||||
<!--@if(trim($oTrashVO->getTitle()))-->
|
||||
<!--@if(isset($module_list[$oTrashVO->unserializedObject['module_srl']]))-->
|
||||
<a href="{getUrl('', 'mid', $module_list[$oTrashVO->unserializedObject['module_srl']]->mid)}" target="_blank">{$module_list[$oTrashVO->unserializedObject['module_srl']]->browser_title}</a> -
|
||||
</block>
|
||||
<!--@end-->
|
||||
<a href="{getUrl('act','dispTrashAdminView','trash_srl',$oTrashVO->getTrashSrl())}">{$oTrashVO->getTitle()}</a>
|
||||
</block>
|
||||
<!--@else-->
|
||||
<a href="{getUrl('act','dispTrashAdminView','trash_srl',$oTrashVO->getTrashSrl())}">
|
||||
<!--@if($oTrashVO->getOriginModule() == 'comment')-->
|
||||
{$lang->no_text_comment}
|
||||
<!--@else-->
|
||||
{$lang->no_text_document}
|
||||
<!--@end-->
|
||||
</a>
|
||||
<!--@end-->
|
||||
</td>
|
||||
<td class="nowr"><a href="#popup_menu_area" class="member_{$oTrashVO->unserializedObject['member_srl']}">{$oTrashVO->unserializedObject['nick_name']}</a></td>
|
||||
<td class="nowr">{$oTrashVO->unserializedObject['ipaddress']}</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue