mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
댓글 신고시 신고 이유를 적을 수 있게 함
- 댓글에도 신고 이유를 적을 수 있다. - 코드 정리
This commit is contained in:
parent
a9915a7986
commit
4bbd91bd3c
18 changed files with 415 additions and 41 deletions
|
|
@ -60,6 +60,44 @@ class commentView extends comment
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* Report an improper comment
|
||||
* @return void
|
||||
*/
|
||||
function dispCommentDeclare()
|
||||
{
|
||||
$this->setLayoutFile('popup_layout');
|
||||
$comment_srl = Context::get('target_srl');
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
// A message appears if the user is not logged-in
|
||||
if(!$oMemberModel->isLogged())
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
}
|
||||
|
||||
// Create the comment object.
|
||||
$oCommentModel = getModel('comment');
|
||||
// Creates an object for displaying the selected comment
|
||||
$oComment = $oCommentModel->getComment($comment_srl);
|
||||
if(!$oComment->isExists())
|
||||
{
|
||||
return new Object(-1,'msg_invalid_request');
|
||||
}
|
||||
// Check permissions
|
||||
if(!$oComment->isAccessible())
|
||||
{
|
||||
return new Object(-1,'msg_not_permitted');
|
||||
}
|
||||
|
||||
// Browser title settings
|
||||
Context::set('target_comment', $oComment);
|
||||
|
||||
Context::set('target_srl', $comment_srl);
|
||||
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('declare_comment');
|
||||
}
|
||||
}
|
||||
/* End of file comment.view.php */
|
||||
/* Location: ./modules/comment/comment.view.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue