mirror of
https://github.com/webmin/webmin.git
synced 2026-09-14 01:20:38 +01:00
Nicer MIME type names
This commit is contained in:
@@ -5390,11 +5390,17 @@ if (!@list_mime_types_cache) {
|
||||
local $_;
|
||||
open(MIME, "$root_directory/mime.types");
|
||||
while(<MIME>) {
|
||||
local $cmt;
|
||||
s/\r|\n//g;
|
||||
s/#.*$//g;
|
||||
if (s/#\s*(.*)$//g) {
|
||||
$cmt = $1;
|
||||
}
|
||||
local ($type, @exts) = split(/\s+/);
|
||||
push(@list_mime_types_cache, { 'type' => $type,
|
||||
'exts' => \@exts });
|
||||
if ($type) {
|
||||
push(@list_mime_types_cache, { 'type' => $type,
|
||||
'exts' => \@exts,
|
||||
'desc' => $cmt });
|
||||
}
|
||||
}
|
||||
close(MIME);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user