Fix compatibility with chwala-0.4 (Bifrost#T31552)
This commit is contained in:
parent
e5d2934e31
commit
fdcb5c0c58
1 changed files with 19 additions and 18 deletions
|
@ -1435,18 +1435,15 @@ class kolab_files_engine
|
|||
if (array_key_exists($type, $this->mimetypes)) {
|
||||
$mimetypes = $this->mimetypes[$type];
|
||||
}
|
||||
else {
|
||||
$mimetypes = $this->mimetypes;
|
||||
}
|
||||
}
|
||||
|
||||
// fallback to static definition if old Chwala is used
|
||||
if ($type == 'edit' && empty($mimetypes)) {
|
||||
else if ($type == 'edit') {
|
||||
$mimetypes = array(
|
||||
'application/vnd.oasis.opendocument.text' => 'odt',
|
||||
'text/plain' => 'txt',
|
||||
'text/html' => 'html',
|
||||
);
|
||||
if (!empty($_SESSION['kolab_files_caps']['MANTICORE'])) {
|
||||
$mimetypes = array_merge(array('application/vnd.oasis.opendocument.text' => 'odt'), $mimetypes);
|
||||
}
|
||||
|
||||
foreach (array_keys($mimetypes) as $type) {
|
||||
list ($app, $label) = explode('/', $type);
|
||||
|
@ -1457,6 +1454,10 @@ class kolab_files_engine
|
|||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$mimetypes = $this->mimetypes;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception $e) {
|
||||
rcube::raise_error(array(
|
||||
|
|
Loading…
Add table
Reference in a new issue