#68617 by zen, remove trailing ampersand from tablesort URLs.

nackport from HEAD
4.7.x
Gerhard Killesreiter 2006-07-18 11:40:56 +00:00
parent 69049a1b68
commit 4dd5251437
1 changed files with 5 additions and 3 deletions

View File

@ -74,7 +74,11 @@ function tablesort_header($cell, $header, $ts) {
$ts['sort'] = 'asc';
$image = '';
}
$cell['data'] = l($cell['data'] . $image, $_GET['q'], array('title' => $title), 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) .'&'. $ts['query_string'], NULL, FALSE, TRUE);
if (!empty($ts['query_string'])) {
$ts['query_string'] = '&'. $ts['query_string'];
}
$cell['data'] = l($cell['data'] . $image, $_GET['q'], array('title' => $title), 'sort='. $ts['sort'] .'&order='. urlencode($cell['data']) . $ts['query_string'], NULL, FALSE, TRUE);
unset($cell['field'], $cell['sort']);
}
@ -183,5 +187,3 @@ function tablesort_get_sort($headers) {
}
return 'asc';
}