mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 05:02:02 +02:00
Ajax API - fixed comment next/prev issue.
This commit is contained in:
parent
92d5da7710
commit
7b77ed14b6
@ -1202,13 +1202,16 @@ class comment
|
||||
{
|
||||
//return "table=".$table." id=".$id." from=".$from;
|
||||
//$from = $from + $this->commentsPerPage;
|
||||
|
||||
|
||||
|
||||
|
||||
// from calculations are done by eNav() js.
|
||||
if($this->totalComments > $this->commentsPerPage)
|
||||
{
|
||||
return "<a class='e-ajax btn btn-default btn-mini btn-sm' href='#' data-nav-total='{$this->totalComments}' data-nav-dir='down' data-nav-inc='{$this->commentsPerPage}' data-target='comments-container' data-src='".e_BASE."comment.php?mode=list&type=".$table."&id=".$id."&from=0'>" . LAN_PREVIOUS . "</a>
|
||||
<a class='e-ajax btn btn-default btn-mini btn-sm' href='#' data-nav-total='{$this->totalComments}' data-nav-dir='up' data-nav-inc='{$this->commentsPerPage}' data-target='comments-container' data-src='".e_BASE."comment.php?mode=list&type=".$table."&id=".$id."&from=0'>" . LAN_NEXT . "</a>";
|
||||
$prev = e_HTTP . 'comment.php?mode=list&type=' . $table . '&id=' . $id . '&from=0';
|
||||
$next = e_HTTP . 'comment.php?mode=list&type=' . $table . '&id=' . $id . '&from=0';
|
||||
|
||||
return "<a class='e-ajax btn btn-default btn-mini btn-sm' href='#' data-nav-total='{$this->totalComments}' data-nav-dir='down' data-nav-inc='{$this->commentsPerPage}' data-target='comments-container' data-src='{$prev}'>" . LAN_PREVIOUS . "</a>
|
||||
<a class='e-ajax btn btn-default btn-mini btn-sm' href='#' data-nav-total='{$this->totalComments}' data-nav-dir='up' data-nav-inc='{$this->commentsPerPage}' data-target='comments-container' data-src='{$next}'>" . LAN_NEXT . "</a>";
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user