diff options
Diffstat (limited to 'mod/file/start.php')
| -rw-r--r-- | mod/file/start.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/mod/file/start.php b/mod/file/start.php index ad88469c8..7c0c216b2 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -121,6 +121,10 @@ function file_page_handler($page) { file_register_toggle(); include "$file_dir/friends.php"; break; + case 'read': // Elgg 1.7 compatibility + register_error(elgg_echo("changebookmark")); + forward("file/view/{$page[1]}"); + break; case 'view': set_input('guid', $page[1]); include "$file_dir/view.php"; @@ -232,18 +236,22 @@ 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; + + if ($simpletype = elgg_trigger_plugin_hook('file:simpletype', $mimetype, null, null)) { + return $simpletype; } switch ($mimetype) { case "application/msword": + case "application/vnd.openxmlformats-officedocument.wordprocessingml.document": return "document"; break; case "application/pdf": return "document"; break; + case "application/ogg": + return "audio"; + break; } if (substr_count($mimetype, 'text/')) { @@ -356,11 +364,15 @@ function file_icon_url_override($hook, $type, $returnvalue, $params) { $mapping = array( 'application/excel' => 'excel', 'application/msword' => 'word', + 'application/ogg' => 'music', 'application/pdf' => 'pdf', 'application/powerpoint' => 'ppt', 'application/vnd.ms-excel' => 'excel', 'application/vnd.ms-powerpoint' => 'ppt', 'application/vnd.oasis.opendocument.text' => 'openoffice', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'word', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'excel', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'ppt', 'application/x-gzip' => 'archive', 'application/x-rar-compressed' => 'archive', 'application/x-stuffit' => 'archive', |
