Adapt to recent changes in core regarding the client_mimetype settings
This commit is contained in:
parent
259a7ec81d
commit
fa03bf1dd8
2 changed files with 2 additions and 5 deletions
|
@ -165,8 +165,7 @@ class libcalendaring extends rcube_plugin
|
|||
|
||||
// define list of file types which can be displayed inline
|
||||
// same as in program/steps/mail/show.inc
|
||||
$mimetypes = $this->rc->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash');
|
||||
$settings['mimetypes'] = is_string($mimetypes) ? explode(',', $mimetypes) : (array)$mimetypes;
|
||||
$settings['mimetypes'] = (array)$this->rc->config->get('client_mimetypes');
|
||||
|
||||
return $settings;
|
||||
}
|
||||
|
|
|
@ -59,9 +59,7 @@ class odfviewer extends rcube_plugin
|
|||
// extend list of mimetypes that should open in preview
|
||||
$rcmail = rcube::get_instance();
|
||||
if ($rcmail->action == 'preview' || $rcmail->action == 'show' || $rcmail->task == 'calendar' || $rcmail->task == 'tasks') {
|
||||
$mimetypes = $rcmail->config->get('client_mimetypes', 'text/plain,text/html,text/xml,image/jpeg,image/gif,image/png,application/x-javascript,application/pdf,application/x-shockwave-flash');
|
||||
if (!is_array($mimetypes))
|
||||
$mimetypes = explode(',', $mimetypes);
|
||||
$mimetypes = (array)$rcmail->config->get('client_mimetypes');
|
||||
$rcmail->config->set('client_mimetypes', array_merge($mimetypes, $this->odf_mimetypes));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue