/* 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');
$tnef = &Horde_Compress::singleton('tnef');
$tnefData = $tnef->decompress($this->_mimepart->getContents());
- $data = '';
+ $text = '';
if (!count($tnefData)) {
$status = array(
);
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']);
$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'] . ")<br />\n";
+ $text .= _("Attached File:") . ' ' . $link . ' (' . $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()
)