Adapt to new roundcube framework API (#787)
This commit is contained in:
parent
cb61bf76a1
commit
f5e96dcabb
1 changed files with 7 additions and 7 deletions
|
@ -2220,15 +2220,15 @@ class calendar extends rcube_plugin
|
||||||
$charset = RCMAIL_CHARSET;
|
$charset = RCMAIL_CHARSET;
|
||||||
|
|
||||||
// establish imap connection
|
// establish imap connection
|
||||||
$this->rc->imap_connect();
|
$imap = $this->rc->get_storage();
|
||||||
$this->rc->imap->set_mailbox($mbox);
|
$imap->set_mailbox($mbox);
|
||||||
|
|
||||||
if ($uid && $mime_id) {
|
if ($uid && $mime_id) {
|
||||||
list($mime_id, $index) = explode(':', $mime_id);
|
list($mime_id, $index) = explode(':', $mime_id);
|
||||||
$part = $this->rc->imap->get_message_part($uid, $mime_id);
|
$part = $imap->get_message_part($uid, $mime_id);
|
||||||
if ($part->ctype_parameters['charset'])
|
if ($part->ctype_parameters['charset'])
|
||||||
$charset = $part->ctype_parameters['charset'];
|
$charset = $part->ctype_parameters['charset'];
|
||||||
$headers = $this->rc->imap->get_headers($uid);
|
$headers = $imap->get_message_headers($uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
$events = $this->get_ical()->import($part, $charset);
|
$events = $this->get_ical()->import($part, $charset);
|
||||||
|
@ -2365,8 +2365,8 @@ class calendar extends rcube_plugin
|
||||||
$event = array();
|
$event = array();
|
||||||
|
|
||||||
// establish imap connection
|
// establish imap connection
|
||||||
$this->rc->imap_connect();
|
$imap = $this->rc->get_storage();
|
||||||
$this->rc->imap->set_mailbox($mbox);
|
$imap->set_mailbox($mbox);
|
||||||
$message = new rcube_message($uid);
|
$message = new rcube_message($uid);
|
||||||
|
|
||||||
if ($message->headers) {
|
if ($message->headers) {
|
||||||
|
@ -2384,7 +2384,7 @@ class calendar extends rcube_plugin
|
||||||
|
|
||||||
foreach ((array)$message->attachments as $part) {
|
foreach ((array)$message->attachments as $part) {
|
||||||
$attachment = array(
|
$attachment = array(
|
||||||
'data' => $this->rc->imap->get_message_part($uid, $part->mime_id, $part),
|
'data' => $imap->get_message_part($uid, $part->mime_id, $part),
|
||||||
'size' => $part->size,
|
'size' => $part->size,
|
||||||
'name' => $part->filename,
|
'name' => $part->filename,
|
||||||
'mimetype' => $part->mimetype,
|
'mimetype' => $part->mimetype,
|
||||||
|
|
Loading…
Add table
Reference in a new issue