Skip to content
Snippets Groups Projects
Commit aeb20675 authored by Robin McCorkell's avatar Robin McCorkell Committed by Roeland Jago Douma
Browse files

Allow recursive mimetype aliases

application/xml -> text/html -> text/code
parent cd7aff47
No related branches found
No related tags found
No related merge requests found
......@@ -70,7 +70,7 @@ OC.MimeType = {
return undefined;
}
if (mimeType in OC.MimeTypeList.aliases) {
while (mimeType in OC.MimeTypeList.aliases) {
mimeType = OC.MimeTypeList.aliases[mimeType];
}
if (mimeType in OC.MimeType._mimeTypeIcons) {
......
......@@ -269,7 +269,7 @@ class Detection implements IMimeTypeDetector {
public function mimeTypeIcon($mimetype) {
$this->loadAliases();
if (isset($this->mimeTypeAlias[$mimetype])) {
while (isset($this->mimeTypeAlias[$mimetype])) {
$mimetype = $this->mimeTypeAlias[$mimetype];
}
if (isset($this->mimetypeIcons[$mimetype])) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment