From 09d2e60aca5c6d1932f618472e962baa09efd736 Mon Sep 17 00:00:00 2001 From: Sem Date: Sat, 31 Dec 2011 18:04:13 +0100 Subject: Added hook trigger to allow plugins solve problems with mime types. --- mod/file/start.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod/file') diff --git a/mod/file/start.php b/mod/file/start.php index e15a9ad61..3e1ae169d 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -233,6 +233,10 @@ function file_owner_block_menu($hook, $type, $return, $params) { */ function file_get_simple_type($mimetype) { + if($type = elgg_trigger_plugin_hook('file_simple_type', 'object', $params, null)) { + return $type; + } + switch ($mimetype) { case "application/msword": return "document"; @@ -396,4 +400,4 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) { $url = elgg_trigger_plugin_hook('file:icon:url', 'override', $params, $url); return $url; } -} \ No newline at end of file +} -- cgit v1.2.3