diff --git a/phpgwapi/inc/class.mime_magic.inc.php b/phpgwapi/inc/class.mime_magic.inc.php index 07cffe8a9f..baa3dd32a1 100644 --- a/phpgwapi/inc/class.mime_magic.inc.php +++ b/phpgwapi/inc/class.mime_magic.inc.php @@ -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', diff --git a/phpgwapi/inc/class.vfs_sql.inc.php b/phpgwapi/inc/class.vfs_sql.inc.php index 1db06b34fb..ea1b5d24c5 100644 --- a/phpgwapi/inc/class.vfs_sql.inc.php +++ b/phpgwapi/inc/class.vfs_sql.inc.php @@ -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; } } -?> \ No newline at end of file +?>