Some fixes.
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 13 Nov 2008 07:01:53 +0000 (00:01 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 13 Nov 2008 07:01:53 +0000 (00:01 -0700)
imp/lib/Mime/Viewer/alternative.php
imp/lib/Mime/Viewer/tnef.php

index 997d4bf..269b256 100644 (file)
@@ -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');
index 7395106..adf6c23 100644 (file)
@@ -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:") . '&nbsp;&nbsp;' . $link . '&nbsp;&nbsp;(' . $data['type'] . '/' . $data['subtype'] . ")<br />\n";
+                $text .= _("Attached File:") . '&nbsp;&nbsp;' . $link . '&nbsp;&nbsp;(' . $data['type'] . '/' . $data['subtype'] . ")<br />\n";
             }
         }
 
         return array(
             $this->_mimepart->getMimeId() => array(
-                'data' => $data,
+                'data' => $text,
                 'status' => array($status),
                 'type' => 'text/html; charset=' . NLS::getCharset()
             )