Fix #1190 make comment page count configurable

This commit is contained in:
Kijin Sung 2019-09-13 20:11:32 +09:00
parent 9b64b0f925
commit 73c5b6d84b
5 changed files with 25 additions and 8 deletions

View file

@ -481,10 +481,7 @@ class commentModel extends comment
{
$comment_config = $this->getCommentConfig($module_srl);
$comment_count = $comment_config->comment_count;
if(!$comment_count)
{
$comment_count = 50;
}
$comment_page_count = $comment_config->comment_page_count;
}
else
{
@ -501,8 +498,8 @@ class commentModel extends comment
$args = new stdClass();
$args->document_srl = $document_srl;
$args->list_count = $comment_count;
$args->page_count = $comment_page_count;
$args->page = $page;
$args->page_count = 10;
//check if module is using validation system
$oCommentController = getController('comment');
@ -987,10 +984,14 @@ class commentModel extends comment
$comment_config = new stdClass();
}
if(!isset($comment_config->comment_count))
if(!isset($comment_config->comment_count) || !$comment_config->comment_count)
{
$comment_config->comment_count = 50;
}
if(!isset($comment_config->comment_page_count) || $comment_config->comment_page_count)
{
$comment_config->comment_page_count = 10;
}
return $comment_config;
}