summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-02-01 10:39:23 +0000
committerDries Buytaert <dries@buytaert.net>2004-02-01 10:39:23 +0000
commitcfcba7cfbb1ed5b926771a569417cba125677e24 (patch)
tree5d488b94cfbbc8d19b0c93aa8207929ab44d1faf
parentfb1195258fc8f377b693a9f69cfde84549c3754d (diff)
downloadbrdo-cfcba7cfbb1ed5b926771a569417cba125677e24.tar.gz
brdo-cfcba7cfbb1ed5b926771a569417cba125677e24.tar.bz2
- Modified patch from pz: made tablesort.inc's validate.
-rw-r--r--includes/tablesort.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/tablesort.inc b/includes/tablesort.inc
index 74bd5e3ca..308693b3c 100644
--- a/includes/tablesort.inc
+++ b/includes/tablesort.inc
@@ -32,7 +32,7 @@ function tablesort($cell, $header) {
// special formatting for the currently sorted column header
if ($cell['data'] == $ts['order']) {
$cell['class'] = 'cell-highlight';
- $image = "&nbsp;<img border=\"0\" src=\"". theme('image', "arrow-". $ts['sort']. ".gif"). "\"></img>";
+ $image = '&nbsp;<img src="' . theme('image', 'arrow-' . $ts['sort'] . '.gif"') . ' alt="'. t('sort icon') .'" />';
$dir = array("asc" => "ascending", "desc" => "descending");
$title = t("sort ". $dir[$ts['sort']]);
} else {
@@ -40,11 +40,11 @@ function tablesort($cell, $header) {
$ts['sort'] = "asc";
}
- $cell['data'] = l($cell['data'] . $image, $_GET['q'], array("title" => $title), "sort=". $ts['sort']. "&order=". urlencode($cell['data']). $ts['query_string']);
+ $cell['data'] = l($cell['data'] . $image, $_GET['q'], array("title" => $title), "sort=". $ts['sort']. "&amp;order=". urlencode($cell['data']). $ts['query_string']);
unset($cell['field']);
unset($cell['sort']);
-
+
return $cell;
}
@@ -52,7 +52,7 @@ function tablesort_get_querystring() {
$cgi = $_SERVER['REQUEST_METHOD'] == 'GET' ? $_GET : $_POST;
foreach ($cgi as $key => $val) {
if ($key != 'order' && $key != 'sort' && $key != 'q') {
- $query_string .= "&" . $key . "=" . $val;
+ $query_string .= "&amp;". $key ."=". $val;
}
}
return $query_string;