<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
//append comment if added while forwarding.
if (count($comment)) {
$message->_txtbody = CRM_Utils_Array::value('body_text', $comment) . $message->_txtbody;
- if (CRM_Utils_Array::value('body_html', $comment)) {
+ if (!empty($comment['body_html'])) {
$message->_htmlbody = $comment['body_html'] . '<br />---------------Original message---------------------<br />' . $message->_htmlbody;
}
}
$body = $message->get();
$headers = $message->headers();
- PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,
- array('CRM_Core_Error', 'nullHandler')
- );
$result = NULL;
if (is_object($mailer)) {
+ $errorScope = CRM_Core_TemporaryErrorScope::ignoreException();
$result = $mailer->send($recipient, $headers, $body);
- CRM_Core_Error::setCallback();
+ unset($errorScope);
}
$params = array(
$orderBy = "sort_name ASC, {$forward}.time_stamp DESC";
if ($sort) {
if (is_string($sort)) {
+ $sort = CRM_Utils_Type::escape($sort, 'String');
$orderBy = $sort;
}
else {