From: Michael M Slusarz Date: Thu, 13 Nov 2008 07:01:53 +0000 (-0700) Subject: Some fixes. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=5ef5aed4753e83926a6547aba7baa563aaea3804;p=horde.git Some fixes. --- diff --git a/imp/lib/Mime/Viewer/alternative.php b/imp/lib/Mime/Viewer/alternative.php index 997d4bf60..269b256a2 100644 --- a/imp/lib/Mime/Viewer/alternative.php +++ b/imp/lib/Mime/Viewer/alternative.php @@ -71,7 +71,8 @@ class IMP_Horde_Mime_Viewer_alternative extends Horde_Mime_Viewer_Driver /* Get the list of IDs directly under the subpart. */ reset($subparts); - list($id,) = each($subparts); + next($subparts); + $id = key($subparts); do { $base_ids[] = $id; $id = Horde_Mime::mimeIdArithmetic($id, 'next'); diff --git a/imp/lib/Mime/Viewer/tnef.php b/imp/lib/Mime/Viewer/tnef.php index 7395106ef..adf6c234b 100644 --- a/imp/lib/Mime/Viewer/tnef.php +++ b/imp/lib/Mime/Viewer/tnef.php @@ -82,7 +82,7 @@ class IMP_Horde_Mime_Viewer_tnef extends Horde_Mime_Viewer_tnef $tnef = &Horde_Compress::singleton('tnef'); $tnefData = $tnef->decompress($this->_mimepart->getContents()); - $data = ''; + $text = ''; if (!count($tnefData)) { $status = array( @@ -94,7 +94,7 @@ class IMP_Horde_Mime_Viewer_tnef extends Horde_Mime_Viewer_tnef ); reset($tnefData); - while (list($key, $data) = $tnefData) { + while (list($key, $data) = each($tnefData)) { $temp_part = $this->_mimepart; $temp_part->setName($data['name']); $temp_part->setDescription($data['name']); @@ -108,13 +108,13 @@ class IMP_Horde_Mime_Viewer_tnef extends Horde_Mime_Viewer_tnef $temp_part->setType($type); $link = $this->_params['contents']->linkView($temp_part, 'view_attach', htmlspecialchars($data['name']), array('jstext' => sprintf(_("View %s"), $data['name']), 'params' => array('tnef_attachment' => $key + 1))); - $data .= _("Attached File:") . '  ' . $link . '  (' . $data['type'] . '/' . $data['subtype'] . ")
\n"; + $text .= _("Attached File:") . '  ' . $link . '  (' . $data['type'] . '/' . $data['subtype'] . ")
\n"; } } return array( $this->_mimepart->getMimeId() => array( - 'data' => $data, + 'data' => $text, 'status' => array($status), 'type' => 'text/html; charset=' . NLS::getCharset() )