mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Add optional $page parameter to DocumentItem->getComments()
This commit is contained in:
parent
1326a5e507
commit
47afd4848b
1 changed files with 2 additions and 2 deletions
|
|
@ -965,7 +965,7 @@ class DocumentItem extends BaseObject
|
|||
return $this->get('comment_count');
|
||||
}
|
||||
|
||||
function getComments()
|
||||
function getComments(?int $page = null)
|
||||
{
|
||||
if(!$this->getCommentCount())
|
||||
{
|
||||
|
|
@ -979,7 +979,7 @@ class DocumentItem extends BaseObject
|
|||
|
||||
// cpage is a number of comment pages
|
||||
$cpageStr = sprintf('%d_cpage', $this->document_srl);
|
||||
$cpage = Context::get($cpageStr);
|
||||
$cpage = $page ? $page : Context::get($cpageStr);
|
||||
if(!$cpage)
|
||||
{
|
||||
$cpage = Context::get('cpage');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue