mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 10:49:54 +09:00
댓글을 작성후 다른 이가 비밀댓글을 달았을때 해당 비밀댓글을 원댓글 작성자가 볼 수 있도록 수정 (단 비회원의 댓글-비밀댓글은 해당안됨)
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6669 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
dbf42aae72
commit
f4b354d4df
1 changed files with 10 additions and 0 deletions
|
|
@ -472,9 +472,19 @@
|
|||
if(!$output->toBool() || !count($output->data)) return;
|
||||
|
||||
// 구해온 목록을 commentItem 객체로 만듬
|
||||
// 계층구조에 따라 부모글에 관리권한이 있으면 자식글에는 보기 권한을 줌
|
||||
$accessible = array();
|
||||
foreach($output->data as $key => $val) {
|
||||
$oCommentItem = new commentItem();
|
||||
$oCommentItem->setAttribute($val);
|
||||
|
||||
// 권한이 있는 글에 대해 임시로 권한이 있음을 설정
|
||||
if($oCommentItem->isGranted()) $accessible[$val->comment_srl] = true;
|
||||
|
||||
// 현재 댓글이 비밀글이고 부모글이 있는 답글이고 부모글에 대해 관리 권한이 있으면 보기 가능하도록 수정
|
||||
if($val->parent_srl>0 && $val->is_secret == 'Y' && !$oCommentItem->isAccessible() && $accessible[$val->parent_srl]===true) {
|
||||
$oCommentItem->setAccessible();
|
||||
}
|
||||
$comment_list[$val->comment_srl] = $oCommentItem;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue