summaryrefslogtreecommitdiff
path: root/program/include/rcube_message.php
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2012-01-16 15:14:41 +0000
committerthomascube <thomas@roundcube.net>2012-01-16 15:14:41 +0000
commitc321a955a7b0f6d6b13ffaebf040a6c7091037ae (patch)
tree60c257d29a726d9bdda7fb75a198342aaef315fa /program/include/rcube_message.php
parent8764b6ecf0c8d1b0646915a8139cdf6bbac2ca14 (diff)
Merged devel-framework branch (r5746:5779) back into trunk
Diffstat (limited to 'program/include/rcube_message.php')
-rw-r--r--program/include/rcube_message.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index d05b57abe..8c61a4db0 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -76,10 +76,10 @@ class rcube_message
{
$this->uid = $uid;
$this->app = rcmail::get_instance();
- $this->imap = $this->app->imap;
- $this->imap->get_all_headers = true;
+ $this->storage = $this->app->get_storage();
+ $this->storage->set_options(array('all_headers' => true));
- $this->headers = $this->imap->get_message($uid);
+ $this->headers = $this->storage->get_message($uid);
if (!$this->headers)
return;
@@ -94,7 +94,7 @@ class rcube_message
'safe' => $this->is_safe,
'prefer_html' => $this->app->config->get('prefer_html'),
'get_url' => rcmail_url('get', array(
- '_mbox' => $this->imap->get_mailbox_name(), '_uid' => $uid))
+ '_mbox' => $this->storage->get_folder(), '_uid' => $uid))
);
if (!empty($this->headers->structure)) {
@@ -102,7 +102,7 @@ class rcube_message
$this->parse_structure($this->headers->structure);
}
else {
- $this->body = $this->imap->get_body($uid);
+ $this->body = $this->storage->get_body($uid);
}
// notify plugins and let them analyze this structured message object
@@ -176,7 +176,7 @@ class rcube_message
return $fp ? true : $part->body;
}
// get from IMAP
- return $this->imap->get_message_part($this->uid, $mime_id, $part, NULL, $fp);
+ return $this->storage->get_message_part($this->uid, $mime_id, $part, NULL, $fp);
} else
return null;
}
@@ -211,7 +211,7 @@ class rcube_message
foreach ($this->mime_parts as $mime_id => $part) {
$mimetype = strtolower($part->ctype_primary . '/' . $part->ctype_secondary);
if ($mimetype == 'text/html') {
- return $this->imap->get_message_part($this->uid, $mime_id, $part);
+ return $this->storage->get_message_part($this->uid, $mime_id, $part);
}
}
}
@@ -234,10 +234,10 @@ class rcube_message
$mimetype = $part->ctype_primary . '/' . $part->ctype_secondary;
if ($mimetype == 'text/plain') {
- return $this->imap->get_message_part($this->uid, $mime_id, $part);
+ return $this->storage->get_message_part($this->uid, $mime_id, $part);
}
else if ($mimetype == 'text/html') {
- $out = $this->imap->get_message_part($this->uid, $mime_id, $part);
+ $out = $this->storage->get_message_part($this->uid, $mime_id, $part);
// remove special chars encoding
$trans = array_flip(get_html_translation_table(HTML_ENTITIES));
@@ -590,7 +590,7 @@ class rcube_message
{
// @TODO: attachment may be huge, hadle it via file
if (!isset($part->body))
- $part->body = $this->imap->get_message_part($this->uid, $part->mime_id, $part);
+ $part->body = $this->storage->get_message_part($this->uid, $part->mime_id, $part);
$parts = array();
$tnef = new tnef_decoder;
@@ -626,7 +626,7 @@ class rcube_message
{
// @TODO: messages may be huge, hadle body via file
if (!isset($part->body))
- $part->body = $this->imap->get_message_part($this->uid, $part->mime_id, $part);
+ $part->body = $this->storage->get_message_part($this->uid, $part->mime_id, $part);
$parts = array();
// FIXME: line length is max.65?