- don't load some stuff before login (#1486475)

release-0.6
alecpl 15 years ago
parent b77c9d4669
commit 6a7d063e61

@ -15,15 +15,17 @@ class archive extends rcube_plugin
function init() function init()
{ {
$rcmail = rcmail::get_instance();
if (!$rcmail->user->ID)
return;
$this->register_action('plugin.archive', array($this, 'request_action')); $this->register_action('plugin.archive', array($this, 'request_action'));
// There is no "Archived flags" // There is no "Archived flags"
// $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive'; // $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
$rcmail = rcmail::get_instance();
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
&& ($archive_folder = $rcmail->config->get('archive_mbox'))) { && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
$skin_path = $this->local_skin_path(); $skin_path = $this->local_skin_path();
$this->include_script('archive.js'); $this->include_script('archive.js');

@ -14,6 +14,11 @@ class help extends rcube_plugin
{ {
function init() function init()
{ {
$rcmail = rcmail::get_instance();
if (!$rcmail->user->ID)
return;
$this->add_texts('localization/', false); $this->add_texts('localization/', false);
// register actions // register actions
@ -29,7 +34,7 @@ class help extends rcube_plugin
'href' => './?_task=dummy&_action=plugin.help', 'href' => './?_task=dummy&_action=plugin.help',
), 'taskbar'); ), 'taskbar');
$skin = rcmail::get_instance()->config->get('skin'); $skin = $rcmail->config->get('skin');
if (!file_exists($this->home."/skins/$skin/help.css")) if (!file_exists($this->home."/skins/$skin/help.css"))
$skin = 'default'; $skin = 'default';

@ -15,9 +15,13 @@ class markasjunk extends rcube_plugin
function init() function init()
{ {
$this->register_action('plugin.markasjunk', array($this, 'request_action'));
$rcmail = rcmail::get_instance(); $rcmail = rcmail::get_instance();
if (!$rcmail->user->ID)
return;
$this->register_action('plugin.markasjunk', array($this, 'request_action'));
if ($rcmail->action == '' || $rcmail->action == 'show') { if ($rcmail->action == '' || $rcmail->action == 'show') {
$skin_path = $this->local_skin_path(); $skin_path = $this->local_skin_path();
$this->include_script('markasjunk.js'); $this->include_script('markasjunk.js');

Loading…
Cancel
Save