mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix #1214 add option to display the first page of comments by default
This commit is contained in:
parent
676781a83e
commit
b8665d73cb
5 changed files with 26 additions and 1 deletions
|
|
@ -491,7 +491,11 @@ class commentModel extends comment
|
|||
|
||||
// get a very last page if no page exists
|
||||
$total_pages = max(1, ceil($document_comment_count / $comment_count));
|
||||
if(!$page || $page > $total_pages)
|
||||
if(!$page)
|
||||
{
|
||||
$page = (isset($comment_config->default_page) && $comment_config->default_page === 'first') ? 1 : $total_pages;
|
||||
}
|
||||
if($page > $total_pages)
|
||||
{
|
||||
$page = $total_pages;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue