From: Michael M Slusarz Date: Thu, 20 Nov 2008 19:44:38 +0000 (-0700) Subject: No need for SessionObjects; fix display of body parts. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=303c8412b7d1a8d87023cea0d32d0f6d884142cc;p=horde.git No need for SessionObjects; fix display of body parts. --- diff --git a/imp/mailbox.php b/imp/mailbox.php index 3a4504885..5a267f6a1 100644 --- a/imp/mailbox.php +++ b/imp/mailbox.php @@ -188,8 +188,7 @@ case 'empty_mailbox': break; case 'view_messages': - $cacheSess = &Horde_SessionObjects::singleton(); - $redirect = Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], null, null, false), array('mode' => 'msgview', 'msglist' => $cacheSess->storeOid($indices)), null, false); + $redirect = Util::addParameter(IMP::generateIMPUrl('thread.php', $imp_mbox['mailbox'], null, null, false), array('mode' => 'msgview', 'msglist' => IMP::toRangeString(IMP::parseIndicesList($indices))), null, false); header('Location: ' . $redirect); exit; diff --git a/imp/thread.php b/imp/thread.php index 3f1247be2..ab26626c5 100644 --- a/imp/thread.php +++ b/imp/thread.php @@ -27,15 +27,8 @@ if ($mode == 'thread') { } } else { /* MSGVIEW MODE: Make sure we have a valid list of messages. */ - $cacheID = Util::getFormData('msglist'); - if (!$cacheID) { - $error = true; - } - $cacheSess = &Horde_SessionObjects::singleton(); - $msglist = $cacheSess->query($cacheID); - if ($msglist) { - $cacheSess->setPruneFlag($cacheID, true); - } else { + $msglist = IMP::parseRangeString(Util::getFormData('msglist', array())); + if (empty($msglist)) { $error = true; } } @@ -98,7 +91,9 @@ foreach ($loop_array as $mbox => $idxlist) { $contents = &IMP_Contents::singleton($idx . IMP::IDX_SEP . $mbox); $mime_id = $contents->findBody(); if ($contents->canDisplay($mime_id, IMP_Contents::RENDER_INLINE)) { - $curr_msg['body'] = $contents->renderMIMEPart($mime_id, IMP_Contents::RENDER_INLINE); + $ret = $contents->renderMIMEPart($mime_id, IMP_Contents::RENDER_INLINE); + $ret = reset($ret); + $curr_msg['body'] = $ret['data']; } else { $curr_msg['body'] = '' . _("There is no text that can be displayed inline.") . ''; }