models); $mimes = $datastream_mime_map[$dsid]['mime']; if (isset($object[$dsid])) { $current_mime = $object[$dsid]->mimetype; if (!in_array($current_mime, $mimes)) { $mimes[] = $current_mime; } } $extensions = array(); foreach ($mimes as $mime) { $extensions = array_merge($extensions, islandora_get_extensions_for_mimetype($mime)); } return $extensions; }