mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 04:12:00 +02:00
Fixes #2413 - Pagination issue with empty records.
This commit is contained in:
@@ -286,6 +286,9 @@ function nextprev_shortcode($parm = '')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Add 'first', 'previous' navigation
|
||||
if($show_prev)
|
||||
{
|
||||
@@ -306,6 +309,21 @@ function nextprev_shortcode($parm = '')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($tprefix === 'basic_' && $show_prev === false)
|
||||
{
|
||||
if(!empty($tmpl[$tprefix.'nav_prev']))
|
||||
{
|
||||
$e_vars->url = '#';
|
||||
$e_vars->label = $LAN_NP_PREVIOUS;
|
||||
$e_vars->url_label = '';
|
||||
$e_vars->disabled = "disabled";
|
||||
$ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_prev'], $e_vars);
|
||||
$e_vars->disabled = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$e_vars_loop = new e_vars();
|
||||
$e_vars_loop->bullet = stripslashes($bullet); // fix magicquotes
|
||||
$ret_items = array();
|
||||
@@ -353,6 +371,22 @@ function nextprev_shortcode($parm = '')
|
||||
}
|
||||
}
|
||||
|
||||
if($tprefix === 'basic_' && $show_next === false)
|
||||
{
|
||||
if(!empty($tmpl[$tprefix.'nav_next']))
|
||||
{
|
||||
$e_vars->url = '#';
|
||||
$e_vars->label = $LAN_NP_NEXT;
|
||||
$e_vars->url_label = '';
|
||||
$e_vars->disabled = "disabled";
|
||||
$ret_array[] = $tp->simpleParse($tmpl[$tprefix.'nav_next'], $e_vars);
|
||||
$e_vars->disabled = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$ret .= implode($tmpl[$tprefix.'separator'], $ret_array);
|
||||
|
||||
// Nextprev navigation end
|
||||
|
Reference in New Issue
Block a user