summaryrefslogtreecommitdiff
path: root/includes/stream_wrappers.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-31 05:47:34 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-31 05:47:34 +0000
commit41dca3c4e0ec3d355977735f74af2e49ea0eedd7 (patch)
treebd4ac8b82e19e018b3a0c8d12f11d2541fa8488f /includes/stream_wrappers.inc
parent26a5f0408b8db92f85af90695269cc69c67e41bf (diff)
downloadbrdo-41dca3c4e0ec3d355977735f74af2e49ea0eedd7.tar.gz
brdo-41dca3c4e0ec3d355977735f74af2e49ea0eedd7.tar.bz2
- Patch #331171 by pwolanin, mfb, drewish: allow modules to alter the MIME extension mapping rather than setting a huge variable.
Diffstat (limited to 'includes/stream_wrappers.inc')
-rw-r--r--includes/stream_wrappers.inc11
1 files changed, 4 insertions, 7 deletions
diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc
index cb642d979..c58c58231 100644
--- a/includes/stream_wrappers.inc
+++ b/includes/stream_wrappers.inc
@@ -193,13 +193,10 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface
*/
static function getMimeType($uri, $mapping = NULL) {
if (!isset($mapping)) {
- $mapping = variable_get('mime_extension_mapping', NULL);
- if (!isset($mapping)) {
- include_once DRUPAL_ROOT . '/includes/file.mimetypes.inc';
- // The default file map, defined in file.mimetypes.inc is quite big.
- // We only load it when necessary.
- $mapping = file_default_mimetype_mapping();
- }
+ // The default file map, defined in file.mimetypes.inc is quite big.
+ // We only load it when necessary.
+ include_once DRUPAL_ROOT . '/includes/file.mimetypes.inc';
+ $mapping = file_mimetype_mapping();
}
$extension = '';