diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 4ce0b658a60..5065abc69ed 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3034,13 +3034,13 @@ function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictois
* Print a title with navigation controls for pagination
*
* @param string $titre Title to show (required)
- * @param string $page Numero of page to show in navigation links (required)
+ * @param int $page Numero of page to show in navigation links (required)
* @param string $file Url of page (required)
- * @param string $options parametres complementaires lien ('' par defaut)
- * @param string $sortfield champ de tri ('' par defaut)
- * @param string $sortorder ordre de tri ('' par defaut)
- * @param string $center chaine du centre ('' par defaut). We often find here string $massaction comming from $form->selectMassAction()
- * @param int $num number of records found by select with limit+1
+ * @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder)
+ * @param string $sortfield Field to sort on ('' by default)
+ * @param string $sortorder Order to sort ('' by default)
+ * @param string $center Strin gin the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction()
+ * @param int $num Number of records found by select with limit+1
* @param int $totalnboflines Total number of records/lines for all pages (if known). Use a negative value to no show number.
* @param string $picto Icon to use before title (should be a 32x32 transparent png file)
* @param int $pictoisfullpath 1=Icon name is a full absolute url of image
@@ -3106,9 +3106,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
if ($cpt>=1)
{
- $pagelist.= '
dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1';
+ $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'">1';
if ($cpt > 2) $pagelist.='dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...';
- else if ($cpt == 2) $pagelist.='dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">2';
+ else if ($cpt == 2) $pagelist.='dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'">2';
}
do
@@ -3119,7 +3119,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
}
else
{
- $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'';
+ $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'">'.($cpt+1).'';
}
$cpt++;
}
@@ -3128,8 +3128,8 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
if ($cpt<$nbpages)
{
if ($cpt<$nbpages-2) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...';
- else if ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($nbpages - 1).'';
- $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'';
+ else if ($cpt == $nbpages-2) $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'">'.($nbpages - 1).'';
+ $pagelist.= 'dol_use_jmobile)?' class="pagination"':'').'>dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'">'.$nbpages.'';
}
}
else
@@ -3149,7 +3149,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
*
* @param int $page Number of page
* @param string $file Page URL (in most cases provided with $_SERVER["PHP_SELF"])
- * @param string $options Other url paramaters to propagate ("" by default)
+ * @param string $options Other url paramaters to propagate ("" by default, may include sortfield and sortorder)
* @param integer $nextpage Do we show a next page button
* @param string $betweenarrows HTML content to show between arrows. MUST contains ' ' tags or ' '.
* @param string $afterarrows HTML content to show after arrows. Must NOT contains ' ' tags.