<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.4 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2013 |
+--------------------------------------------------------------------+
$this->assign('paymentProcessor', $this->_paymentProcessor);
// get the billing location type
- $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id');
+ $locationTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id', array(), 'validate');
$this->_bltID = array_search('Billing', $locationTypes);
$this->assign('bltID', $this->_bltID);
if (!$this->_bltID) {
$config = CRM_Core_Config::singleton();
// set default country from config if no country set
- if (!CRM_Utils_Array::value("billing_country_id-{$this->_bltID}", $this->_defaults)) {
+ if (empty($this->_defaults["billing_country_id-{$this->_bltID}"])) {
$this->_defaults["billing_country_id-{$this->_bltID}"] = $config->defaultContactCountry;
}
/**
* Function to build the form
*
- * @return None
+ * @return void
* @access public
*/
public function buildQuickForm() {
// format new billing name
$name = $processorParams['first_name'];
- if (CRM_Utils_Array::value('middle_name', $processorParams)) {
+ if (!empty($processorParams['middle_name'])) {
$name .= " {$processorParams['middle_name']}";
}
$name .= ' ' . $processorParams['last_name'];
// format old billing name
$name = $this->_defaults['first_name'];
- if (CRM_Utils_Array::value('middle_name', $this->_defaults)) {
+ if (!empty($this->_defaults['middle_name'])) {
$name .= " {$this->_defaults['middle_name']}";
}
$name .= ' ' . $this->_defaults['last_name'];
'toName' => $donorDisplayName,
'toEmail' => $donorEmail,
);
- list($sent) = CRM_Core_BAO_MessageTemplates::sendTemplate($sendTemplateParams);
+ list($sent) = CRM_Core_BAO_MessageTemplate::sendTemplate($sendTemplateParams);
}
else {
$status = ts('There was some problem updating the billing details.');