Mime type handling overhaul

Changed mime type map to deal with the reality that certain file types have multiple extensions and/or multiple mime types, as well as constants supporting all of the data. Created new functions using the updated mime type map to resolve mime types and extensions. Updated various items around the project that determine mime/extension to take advantage of the new functions.
This commit is contained in:
Matthew Barbour
2020-05-28 10:05:20 -05:00
committed by Shish
parent 16c58e266b
commit 63b2601e67
41 changed files with 575 additions and 270 deletions

View File

@ -35,7 +35,7 @@ class RandomImage extends Extension
send_event(new DisplayingImageEvent($image));
} elseif ($action === "widget") {
$page->set_mode(PageMode::DATA);
$page->set_type("text/html");
$page->set_type(MIME_TYPE_HTML);
$page->set_data($this->theme->build_thumb_html($image));
}
}