Fix Content-Type strings for files and notes; accept application/vnd.kolab+xml when searching for xml part

This commit is contained in:
Thomas Bruederli 2014-03-27 19:20:22 +01:00
parent c6b5283180
commit 6b1de94b51
3 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@
class kolab_format_file extends kolab_format
{
public $CTYPE = 'application/x-vnd.kolab.file';
public $CTYPE = 'application/vnd.kolab+xml';
protected $objclass = 'File';
protected $read_func = 'kolabformat::readKolabFile';

View file

@ -24,7 +24,7 @@
class kolab_format_note extends kolab_format
{
public $CTYPE = 'application/x-vnd.kolab.note';
public $CTYPE = 'application/vnd.kolab+xml';
public $CTYPEv2 = 'application/x-vnd.kolab.note';
protected $objclass = 'Note';

View file

@ -578,7 +578,7 @@ class kolab_storage_folder
// get XML part
foreach ((array)$message->attachments as $part) {
if (!$xml && ($part->mimetype == $content_type || preg_match('!application/([a-z]+\+)?xml!', $part->mimetype))) {
if (!$xml && ($part->mimetype == $content_type || preg_match('!application/([a-z.]+\+)?xml!', $part->mimetype))) {
$xml = $part->body ? $part->body : $message->get_part_content($part->mime_id);
}
else if ($part->filename || $part->content_id) {