diff --git a/plugins/nextcloud_link/nextcloud_link.php b/plugins/nextcloud_link/nextcloud_link.php index c1f9b9a8..0640d1a5 100644 --- a/plugins/nextcloud_link/nextcloud_link.php +++ b/plugins/nextcloud_link/nextcloud_link.php @@ -1,61 +1,61 @@ * * Copyright (C) 2022, Apheleia IT AG * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ class nextcloud_link extends rcube_plugin { public $task = '?(?!login|logout).*'; /** * Plugin initialization. */ function init() { $this->rc = rcube::get_instance(); - if ($this->rc->output->ajax_call || !empty($this->rc->output->env['framed'])) { + if ($this->rc->output->type !== 'html' || !empty($this->rc->output->env['framed'])) { return; } $this->load_config(); $url = $this->rc->config->get('nextcloud_link_url'); if (empty($url)) { return; } $this->add_button([ 'command' => 'nextcloud', 'class' => 'button-nextcloud', 'classsel' => 'button-nextcloud button-selected', 'innerclass' => 'button-inner', 'label' => '', 'type' => 'link' ], 'taskbar'); $this->rc->output->add_footer(" "); } }