diff --git a/web/includes/functions.php b/web/includes/functions.php index 9e0655933..f5d7d443a 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -1472,7 +1472,14 @@ function getPagination( $pages, $page, $maxShortcuts, $query, $querySep='&' function sortHeader( $field, $querySep='&' ) { global $view; - return '?view='.$view.$querySep.'page=1'.$_REQUEST['filter']['query'].$querySep.'sort_field='.$field.$querySep.'sort_asc='.($_REQUEST['sort_field'] == $field?!$_REQUEST['sort_asc']:0).$querySep.'limit='.validInt($_REQUEST['limit']); + return implode($querySep, array( + '?view='.$view, + 'page=1'.$_REQUEST['filter']['query'], + 'sort_field='.$field, + 'sort_asc='.($_REQUEST['sort_field'] == $field ? !$_REQUEST['sort_asc'] : 0), + 'limit='.validInt($_REQUEST['limit']), + ($_REQUEST['eid'] ? 'eid='.$_REQUEST['eid'] : '' ), + )); } function sortTag( $field ) {