mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Issue: #1373 User forum posts pagination fix.
This commit is contained in:
@@ -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)
|
public function rowCount($result=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -877,6 +887,9 @@ class e_db_mysql
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* insert() alias
|
* insert() alias
|
||||||
|
@@ -239,7 +239,8 @@ elseif ($action == 'forums')
|
|||||||
|
|
||||||
$vars->emptyVars();
|
$vars->emptyVars();
|
||||||
|
|
||||||
$ftotal = $sql->total_results;
|
$ftotal = $sqlp->totalResults();
|
||||||
|
|
||||||
$parms = $ftotal.",10,".$from.",".e_REQUEST_SELF."?[FROM].forums.".$id;
|
$parms = $ftotal.",10,".$from.",".e_REQUEST_SELF."?[FROM].forums.".$id;
|
||||||
$vars->NEXTPREV = $ftotal ? $tp->parseTemplate("{NEXTPREV={$parms}}") : '';
|
$vars->NEXTPREV = $ftotal ? $tp->parseTemplate("{NEXTPREV={$parms}}") : '';
|
||||||
if($vars->NEXTPREV) $vars->NEXTPREV = str_replace('{USERPOSTS_NEXTPREV}', $vars->NEXTPREV, $USERPOSTS_TEMPLATE['np_table']);
|
if($vars->NEXTPREV) $vars->NEXTPREV = str_replace('{USERPOSTS_NEXTPREV}', $vars->NEXTPREV, $USERPOSTS_TEMPLATE['np_table']);
|
||||||
|
Reference in New Issue
Block a user