mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 06:13:32 +09:00
댓글 목록에서 cpage가 없으면 제일 뒷페이지가 나타나도록 하고 페이지가 나눠지지 않으면 페이지 목록을 보이지 않도록 함
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3761 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
87bfa7fbe2
commit
4887c0983d
5 changed files with 29 additions and 17 deletions
|
|
@ -375,13 +375,15 @@
|
|||
if(!$this->allowComment() || !$this->getCommentCount()) return;
|
||||
if(!$this->isGranted() && $this->isSecret()) return;
|
||||
|
||||
// cpage는 댓글페이지의 번호
|
||||
$cpage = Context::get('cpage');
|
||||
if(!$cpage) $cpage = 1;
|
||||
|
||||
// 댓글 목록을 구해옴
|
||||
$oCommentModel = &getModel('comment');
|
||||
$output = $oCommentModel->getCommentList($this->document_srl, $cpage, $is_admin);
|
||||
if(!$output->toBool() || !count($output->data)) return;
|
||||
|
||||
// 구해온 목록을 commentItem 객체로 만듬
|
||||
$oCommentModel = &getModel('comment');
|
||||
foreach($output->data as $key => $val) {
|
||||
$oCommentItem = new commentItem();
|
||||
|
|
@ -389,8 +391,9 @@
|
|||
$comment_list[$val->comment_srl] = $oCommentItem;
|
||||
}
|
||||
|
||||
Context::set('comment_page_navigation', $output->page_navigation);
|
||||
// 스킨에서 출력하기 위한 변수 설정
|
||||
Context::set('cpage', $output->page_navigation->cur_page);
|
||||
if($output->total_page>1) $this->comment_page_navigation = $output->page_navigation;
|
||||
|
||||
return $comment_list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue