Fix Content-Type strings for files and notes; accept application/vnd.kolab+xml when searching for xml part
This commit is contained in:
parent
c6b5283180
commit
6b1de94b51
3 changed files with 3 additions and 3 deletions
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue