issue 1553, added a '[document_srl]_cpage' variable for multi comment navigation.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10228 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-02-28 05:26:10 +00:00
parent 2634244f96
commit 9a9387b55a

View file

@ -519,7 +519,14 @@
if(!$this->getCommentCount()) return;
if(!$this->isGranted() && $this->isSecret()) return;
// cpage is a number of comment pages
$cpage = Context::get('cpage');
$cpageStr = sprintf('%d_cpage', $this->document_srl);
$cpage = Context::get($cpageStr);
if(!$cpage)
{
$cpage = Context::get('cpage');
}
// Get a list of comments
$oCommentModel = &getModel('comment');
$output = $oCommentModel->getCommentList($this->document_srl, $cpage, $is_admin);
@ -539,6 +546,7 @@
$comment_list[$val->comment_srl] = $oCommentItem;
}
// Variable setting to be displayed on the skin
Context::set($cpageStr, $output->page_navigation->cur_page);
Context::set('cpage', $output->page_navigation->cur_page);
if($output->total_page>1) $this->comment_page_navigation = $output->page_navigation;