From 4d350d599ef069389732af26d5f5fc23d7caac23 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 25 Feb 2016 18:16:54 +0100 Subject: [PATCH] Performance: Load tags UI (and initialize configuration folder/cache) on when it's needed --- plugins/kolab_tags/lib/kolab_tags_engine.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/kolab_tags/lib/kolab_tags_engine.php b/plugins/kolab_tags/lib/kolab_tags_engine.php index 1c45040f..49a37fbf 100644 --- a/plugins/kolab_tags/lib/kolab_tags_engine.php +++ b/plugins/kolab_tags/lib/kolab_tags_engine.php @@ -46,7 +46,12 @@ class kolab_tags_engine */ public function ui() { - if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview', 'dialog-ui'))) { + // set templates of Files UI and widgets + if ($this->rc->task != 'mail') { + return; + } + + if ($this->rc->action && !in_array($this->rc->action, array('show', 'preview'))) { return; } @@ -57,7 +62,7 @@ class kolab_tags_engine $this->rc->output->add_label('cancel', 'save'); $this->plugin->add_label('tags', 'add', 'edit', 'delete', 'saving', 'nameempty', 'nameexists', 'colorinvalid', 'untag', 'tagname', - 'tagcolor', 'tagsearchnew', 'newtag', 'notags'); + 'tagcolor', 'tagsearchnew', 'newtag'); $this->rc->output->add_handlers(array( 'plugin.taglist' => array($this, 'taglist'),