Commit df3afcbc authored by Dries's avatar Dries

- Don't use the global theme object; use theme() instead.
parent 18e840ac
......@@ -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
?>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment