From 34aec72131fee81697685f9781358e4871ea0150 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Tue, 15 Sep 2009 09:47:12 -0400
Subject: [PATCH] - Support skins in 'archive' and 'markasjunk' plugins
---
plugins/archive/archive.php | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index 9df7f8b..7750160 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -17,18 +17,22 @@
{
$this->register_action('plugin.archive', array($this, 'request_action'));
- # There is no "Archived flags"
- # $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
+ // There is no "Archived flags"
+ // $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
$rcmail = rcmail::get_instance();
- if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
+ if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
+ && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
+
+ $skin_path = 'skins/'.$rcmail->output->config['skin'];
+
$this->include_script('archive.js');
$this->add_texts('localization', true);
$this->add_button(
array(
'command' => 'plugin.archive',
- 'imagepas' => 'archive_pas.png',
- 'imageact' => 'archive_act.png',
+ 'imagepas' => $skin_path.'/archive_pas.png',
+ 'imageact' => $skin_path.'/archive_act.png',
'title' => 'buttontitle',
'domain' => $this->ID,
),
@@ -39,13 +43,13 @@
// set env variable for client
$rcmail->output->set_env('archive_folder', $archive_folder);
+ $rcmail->output->set_env('archive_folder_icon', $this->url($skin_path.'/foldericon.png'));
// add archive folder to the list of default mailboxes
if (($default_folders = $rcmail->config->get('default_imap_folders')) && !in_array($archive_folder, $default_folders)) {
$default_folders[] = $archive_folder;
$rcmail->config->set('default_imap_folders', $default_folders);
- }
-
+ }
}
else if ($rcmail->task == 'settings') {
$dont_override = $rcmail->config->get('dont_override', array());
--
Gitblit v1.9.1