mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
Issue: #1373 User forum posts pagination fix.
This commit is contained in:
parent
3c57e47a8c
commit
46a63ca70e
@ -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']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user