diff --git a/includes/common.inc b/includes/common.inc index 3afdf3cfd17..27ae73d3bd8 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -803,10 +803,10 @@ function format_date($timestamp, $type = "medium", $format = "") { } for ($i = strlen($format); $i >= 0; $c = $format[--$i]) { - if (strstr("DFlMSw", $c)) { + if (strstr("AaDFlM", $c)) { $date = t(date($c, $timestamp)) . $date; } - else if (strstr("AaBdgGhHiIjLmnOrstTUWYyZz", $c)) { + else if (strstr("BdgGhHiIjLmnOrsStTUwWYyZz", $c)) { $date = date($c, $timestamp) . $date; } else { diff --git a/includes/tablesort.inc b/includes/tablesort.inc index 308693b3cb4..a15bcdfe485 100644 --- a/includes/tablesort.inc +++ b/includes/tablesort.inc @@ -33,8 +33,7 @@ function tablesort($cell, $header) { if ($cell['data'] == $ts['order']) { $cell['class'] = 'cell-highlight'; $image = ' '. t('sort icon') .''; - $dir = array("asc" => "ascending", "desc" => "descending"); - $title = t("sort ". $dir[$ts['sort']]); + $title = ($ts['sort'] == 'asc' ? t("sort ascending") : t("sort descending")); } else { // If the user clicks a different header, we want to sort ascending initially. $ts['sort'] = "asc";