forked from Wavyzz/dolibarr
FIX sortfield and sortorder parameters output twice in navigation url.
This commit is contained in:
@@ -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.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">1</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'">1</a></li>';
|
||||
if ($cpt > 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...</span></li>';
|
||||
else if ($cpt == 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">2</a></li>';
|
||||
else if ($cpt == 2) $pagelist.='<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'">2</a></li>';
|
||||
}
|
||||
|
||||
do
|
||||
@@ -3119,7 +3119,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
}
|
||||
else
|
||||
{
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($cpt+1).'</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'">'.($cpt+1).'</a></li>';
|
||||
}
|
||||
$cpt++;
|
||||
}
|
||||
@@ -3128,8 +3128,8 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
||||
if ($cpt<$nbpages)
|
||||
{
|
||||
if ($cpt<$nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><span '.(empty($conf->dol_use_jmobile)?'class="inactive"':'data-role="button"').'>...</span></li>';
|
||||
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.($nbpages - 1).'</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'&sortfield='.$sortfield.'&sortorder='.$sortorder.'">'.$nbpages.'</a></li>';
|
||||
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'">'.($nbpages - 1).'</a></li>';
|
||||
$pagelist.= '<li'.(empty($conf->dol_use_jmobile)?' class="pagination"':'').'><a '.(empty($conf->dol_use_jmobile)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'">'.$nbpages.'</a></li>';
|
||||
}
|
||||
}
|
||||
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 '<li> </li>' tags or '<li><span> </span></li>'.
|
||||
* @param string $afterarrows HTML content to show after arrows. Must NOT contains '<li> </li>' tags.
|
||||
|
||||
Reference in New Issue
Block a user