break;
}
- $reply_msg = $imp_compose->replyMessage($vars->type, reset($contents), $header['to']);
+ $reply_msg = $imp_compose->replyMessage($vars->type, $contents, $header['to']);
$msg = $reply_msg['body'];
$header = $reply_msg['headers'];
$header['replytype'] = 'reply';
$rte = $show_editor = ($prefs->getValue('compose_html') && $_SESSION['imp']['rteavail']);
} else {
- if (!($contents = $imp_ui->getContents($vars))) {
- break;
- }
+
try {
$contents = $imp_ui->getContents($vars);
} catch (IMP_Compose_Exception $e) {
case 'forward_redirect':
try {
$contents = $imp_ui->getContents($vars);
- $imp_compose->redirectMessage(reset($contents));
+ $imp_compose->redirectMessage($contents);
$get_sig = false;
$title = _("Redirect");
$vars->type = 'redirect';
*/
public function getContents($vars = null)
{
- $ob = null;
+ $indices = $ob = null;
if (is_null($vars)) {
/* IMP: compose.php */
$indices = new IMP_Indices($vars->folder, $vars->uid);
}
- if (!is_null($ob)) {
+ if (!is_null($indices)) {
try {
$ob = $GLOBALS['injector']->getInstance('IMP_Contents')->getOb($indices);
} catch (Horde_Exception $e) {}