summaryrefslogtreecommitdiff
path: root/program/include/main.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/main.inc')
-rw-r--r--program/include/main.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 148c2bd5c..9f154e4b7 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1627,12 +1627,14 @@ function rcmail_filetype2classname($mimetype, $filename)
list($primary, $secondary) = explode('/', $mimetype);
$classes = array($primary ? $primary : 'unknown');
- if ($secondary)
+ if ($secondary) {
$classes[] = $secondary;
- if (preg_match('/\.([a-z0-9]+)$/', $filename, $m))
+ }
+ if (preg_match('/\.([a-z0-9]+)$/i', $filename, $m)) {
$classes[] = $m[1];
+ }
- return join(" ", $classes);
+ return strtolower(join(" ", $classes));
}
/**