Skip to content
Snippets Groups Projects
Commit df3afcbc authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Don't use the global theme object; use theme() instead.
parent 18e840ac
No related branches found
No related tags found
No related merge requests found
......@@ -25,15 +25,13 @@ function tablesort_sql($header) {
}
function tablesort($cell, $header) {
global $theme;
$ts = tablesort_init($header);
$title = t("sort by %s", array("%s" => $cell["data"]));
// 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 border=\"0\" src=\"". theme("image", "arrow-". $ts["sort"]. ".gif"). "\"></img>";
$dir = array("asc" => "ascending", "desc" => "descending");
$title = t("sort ". $dir[$ts["sort"]]);
}
......@@ -93,4 +91,4 @@ function tablesort_get_sort($headers) {
return 'asc';
}
?>
\ No newline at end of file
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment