forked from extern/egroupware
added OpenOffice Fileextensions to class.mime_magic.inc.php;
fixed a problem for the refreshing of a directory: mime_types got lost, when refreshing and the mime type could not be determined by get_real_info. the fix uses the phpgwapi.mime_magic.ext2mime function to determine the mime_type if the common method fails to find one.
This commit is contained in:
parent
9ed30cc5ad
commit
dc2acf4428
@ -235,6 +235,7 @@
|
||||
* MIME types.
|
||||
*
|
||||
* Original array taken from http://horde.org
|
||||
* added OpenOffice Extensions by KL@stylite.de
|
||||
*
|
||||
* @author skwashd
|
||||
*
|
||||
@ -331,6 +332,11 @@
|
||||
'mxu' => 'video/vnd.mpegurl',
|
||||
'nc' => 'application/x-netcdf',
|
||||
'oda' => 'application/oda',
|
||||
'odb' => 'application/vnd.oasis.opendocument.database',
|
||||
'odg' => 'application/vnd.oasis.opendocument.graphics',
|
||||
'odt' => 'application/vnd.oasis.opendocument.text',
|
||||
'odp' => 'application/vnd.oasis.opendocument.presentation',
|
||||
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
|
||||
'patch' => 'text/diff',
|
||||
'pbm' => 'image/x-portable-bitmap',
|
||||
'pdb' => 'chemical/x-pdb',
|
||||
|
@ -2590,7 +2590,12 @@
|
||||
'string' => $p->fake_name
|
||||
)
|
||||
);
|
||||
|
||||
if (!$mime_type)
|
||||
{
|
||||
$parts = explode('.',$p->fake_name);
|
||||
$_ext = array_pop($parts);
|
||||
$mime_type = ExecMethod('phpgwapi.mime_magic.ext2mime',$_ext);
|
||||
}
|
||||
if($mime_type)
|
||||
{
|
||||
$this->db->update($this->vfs_table,array(
|
||||
@ -2614,4 +2619,4 @@
|
||||
return $rarray;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user