]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added hook trigger to allow plugins solve problems with mime types.
authorSem <sembrestels@riseup.net>
Sat, 31 Dec 2011 03:37:59 +0000 (04:37 +0100)
committerSem <sembrestels@riseup.net>
Sat, 31 Dec 2011 03:37:59 +0000 (04:37 +0100)
mod/file/start.php

index e15a9ad612147c2c3cbd16dbd70900a4c6a70c3f..8c8883b6e721cf2e651db1153bf2ab179330e31d 100644 (file)
@@ -232,6 +232,10 @@ function file_owner_block_menu($hook, $type, $return, $params) {
  * @return string The overall type
  */
 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":
@@ -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
+}