From 570f43c87484c68631c1180743bed5cc0cbb7d24 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 13 Oct 2015 09:13:44 +0200 Subject: [PATCH] Don't load enigma and managesieve css where it's not needed --- plugins/enigma/enigma.php | 5 ++++- plugins/managesieve/managesieve.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php index 1f406bb38..8e8ded2a1 100644 --- a/plugins/enigma/enigma.php +++ b/plugins/enigma/enigma.php @@ -80,7 +80,10 @@ class enigma extends rcube_plugin // $this->register_action('plugin.enigmacerts', array($this, 'preferences_ui')); $this->load_ui(); - $this->ui->add_css(); + + if (empty($_REQUEST['_framed']) || strpos($this->rc->action, 'plugin.enigma') === 0) { + $this->ui->add_css(); + } } $this->add_hook('refresh', array($this, 'refresh')); diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php index f41394e31..6643847e7 100644 --- a/plugins/managesieve/managesieve.php +++ b/plugins/managesieve/managesieve.php @@ -84,10 +84,10 @@ class managesieve extends rcube_plugin // include styles $skin_path = $this->local_skin_path(); - if ($this->rc->task == 'settings' || $sieve_action) { + if ($sieve_action || ($this->rc->task == 'settings' && empty($_REQUEST['_framed']))) { $this->include_stylesheet("$skin_path/managesieve.css"); } - else { + else if ($this->rc->task == 'mail') { $this->include_stylesheet("$skin_path/managesieve_mail.css"); }