From 9a9387b55a57f101ffbbaa74d5f551c9d811b58d Mon Sep 17 00:00:00 2001 From: flyskyko Date: Tue, 28 Feb 2012 05:26:10 +0000 Subject: [PATCH] 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 --- modules/document/document.item.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/document/document.item.php b/modules/document/document.item.php index a642a843e..7aff0b8ed 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -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;