<?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$
*
*/
);
//if is_email_receipt is set then take receipt_from_email
//as from_email
- if (CRM_Utils_Array::value('is_email_receipt', $default) && CRM_Utils_Array::value('receipt_from_email', $default)) {
+ if (!empty($default['is_email_receipt']) && !empty($default['receipt_from_email'])) {
$mailParams['email_from'] = $default['receipt_from_email'];
}
//if is_email_confirm is set then take confirm_from_email
//as from_email
- if (CRM_Utils_Array::value('is_email_confirm', $default) && CRM_Utils_Array::value('confirm_from_email', $default)) {
+ if (!empty($default['is_email_confirm']) && !empty($default['confirm_from_email'])) {
$mailParams['email_from'] = $default['confirm_from_email'];
}
$form->add('text', 'tf_thankyou_title', ts('Thank-you Title'), CRM_Core_DAO::getAttribute('CRM_Friend_DAO_Friend', 'thankyou_title'), TRUE);
$form->addWysiwyg('tf_thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Friend_DAO_Friend', 'thankyou_text'), TRUE);
+
+ if ($form->_friendId) {
+ // CRM-14200 the i18n dialogs need this for translation
+ $form->assign('friendId', $form->_friendId);
+ }
}
/**
}
// use contact email, CRM-4963
- if (!CRM_Utils_Array::value('email_from', $values)) {
+ if (empty($values['email_from'])) {
$values['email_from'] = $email;
}