diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-14 01:09:52 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-14 01:09:52 +0000 |
commit | 894581558afe0e0e645ca18800741fc9408fd2b8 (patch) | |
tree | 4c74fd4f7d5d753699f8c83fa6d59d6c02ccca73 | |
parent | 7d9f57ff635d360a423d7192dbfe0a24a3ca7df0 (diff) | |
download | brdo-894581558afe0e0e645ca18800741fc9408fd2b8.tar.gz brdo-894581558afe0e0e645ca18800741fc9408fd2b8.tar.bz2 |
#68617 by zen, remove trailing ampersand from tablesort URLs.
-rw-r--r-- | includes/tablesort.inc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc index 340caf4c0..a2bba4d6a 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -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'; } - - |