1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

Issue: User forum posts pagination fix.

This commit is contained in:
Cameron 2016-03-18 08:33:06 -07:00
parent 3c57e47a8c
commit 46a63ca70e
2 changed files with 15 additions and 1 deletions

@ -859,6 +859,16 @@ class e_db_mysql
}
/**
* Return the total number of results on the last query regardless of the LIMIT value.
* @return bool
*/
public function totalResults()
{
return $this->total_results;
}
public function rowCount($result=null)
{
@ -877,6 +887,9 @@ class e_db_mysql
}
/**
* insert() alias

@ -239,7 +239,8 @@ elseif ($action == 'forums')
$vars->emptyVars();
$ftotal = $sql->total_results;
$ftotal = $sqlp->totalResults();
$parms = $ftotal.",10,".$from.",".e_REQUEST_SELF."?[FROM].forums.".$id;
$vars->NEXTPREV = $ftotal ? $tp->parseTemplate("{NEXTPREV={$parms}}") : '';
if($vars->NEXTPREV) $vars->NEXTPREV = str_replace('{USERPOSTS_NEXTPREV}', $vars->NEXTPREV, $USERPOSTS_TEMPLATE['np_table']);