summaryrefslogtreecommitdiff
path: root/plugins/enigma
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-05-07 13:51:23 +0200
committerAleksander Machniak <alec@alec.pl>2013-05-07 13:51:23 +0200
commit2193f6a1301edcb62de6f0cf338acccdbf5ec2f1 (patch)
tree61ccde7d0088c2a5c7274ccdaa2e2fcd91104fed /plugins/enigma
parentef1d6525c2333794d954ccce33de1bcd533f85c8 (diff)
Avoid unused local variables
Diffstat (limited to 'plugins/enigma')
-rw-r--r--plugins/enigma/enigma.php6
-rw-r--r--plugins/enigma/lib/enigma_engine.php16
-rw-r--r--plugins/enigma/lib/enigma_ui.php5
3 files changed, 8 insertions, 19 deletions
diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php
index 1194d26c8..25520a27d 100644
--- a/plugins/enigma/enigma.php
+++ b/plugins/enigma/enigma.php
@@ -149,7 +149,7 @@ class enigma extends rcube_plugin
*/
function parse_structure($p)
{
- $struct = $p['structure'];
+// $struct = $p['structure'];
if ($p['mimetype'] == 'text/plain' || $p['mimetype'] == 'application/pgp') {
$this->parse_plain($p);
@@ -391,7 +391,7 @@ class enigma extends rcube_plugin
function message_load($p)
{
$this->message = $p['object'];
-
+
// handle attachments vcard attachments
foreach ((array)$this->message->attachments as $attachment) {
if ($this->is_keys_part($attachment)) {
@@ -399,7 +399,7 @@ class enigma extends rcube_plugin
}
}
// the same with message bodies
- foreach ((array)$this->message->parts as $idx => $part) {
+ foreach ((array)$this->message->parts as $part) {
if ($this->is_keys_part($part)) {
$this->keys_parts[] = $part->mime_id;
$this->keys_bodies[] = $part->mime_id;
diff --git a/plugins/enigma/lib/enigma_engine.php b/plugins/enigma/lib/enigma_engine.php
index a30a517ec..8a64c07ff 100644
--- a/plugins/enigma/lib/enigma_engine.php
+++ b/plugins/enigma/lib/enigma_engine.php
@@ -497,9 +497,11 @@ class enigma_engine
$uid = rcube_utils::get_input_value('_uid', rcube_utils::INPUT_POST);
$mbox = rcube_utils::get_input_value('_mbox', rcube_utils::INPUT_POST);
$mime_id = rcube_utils::get_input_value('_part', rcube_utils::INPUT_POST);
+ $storage = $this->rc->get_storage();
if ($uid && $mime_id) {
- $part = $this->rc->storage->get_message_part($uid, $mime_id);
+ $storage->set_folder($mbox);
+ $part = $storage->get_message_part($uid, $mime_id);
}
if ($part && is_array($result = $this->import_key($part))) {
@@ -528,16 +530,4 @@ class enigma_engine
$uid, $part->mime_id, $part);
}
}
-
- /**
- * Adds CSS style file to the page header.
- */
- private function add_css()
- {
- $skin = $this->rc->config->get('skin');
- if (!file_exists($this->home . "/skins/$skin/enigma.css"))
- $skin = 'default';
-
- $this->include_stylesheet("skins/$skin/enigma.css");
- }
}
diff --git a/plugins/enigma/lib/enigma_ui.php b/plugins/enigma/lib/enigma_ui.php
index 47366b7e8..adb619d0c 100644
--- a/plugins/enigma/lib/enigma_ui.php
+++ b/plugins/enigma/lib/enigma_ui.php
@@ -176,8 +176,7 @@ class enigma_ui
$search = rcube_utils::get_input_value('_q', rcube_utils::INPUT_GPC);
// define list of cols to be displayed
- $a_show_cols = array('name');
- $result = array();
+// $a_show_cols = array('name');
// Get the list
$list = $this->enigma->engine->list_keys($search);
@@ -200,7 +199,7 @@ class enigma_ui
$size = count($list);
// Add rows
- foreach($list as $idx => $key) {
+ foreach ($list as $key) {
$this->rc->output->command('enigma_add_list_row',
array('name' => rcube::Q($key->name), 'id' => $key->id));
}