<?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$
*
*/
foreach ($pledgeBlock as $key) {
$defaults[$key] = CRM_Utils_Array::value($key, $pledgeBlockDefaults);
}
- if (CRM_Utils_Array::value('pledge_frequency_unit', $pledgeBlockDefaults)) {
+ if (!empty($pledgeBlockDefaults['pledge_frequency_unit'])) {
$defaults['pledge_frequency_unit'] = array_fill_keys(explode(CRM_Core_DAO::VALUE_SEPARATOR,
$pledgeBlockDefaults['pledge_frequency_unit']
), '1');
$defaults['price_set_id'] = $this->_priceSetID;
}
- if (CRM_Utils_Array::value('end_date', $defaults)) {
+ if (!empty($defaults['end_date'])) {
list($defaults['end_date'], $defaults['end_date_time']) = CRM_Utils_Date::setDateDefaults($defaults['end_date']);
}
- if (CRM_Utils_Array::value('start_date', $defaults)) {
+ if (!empty($defaults['start_date'])) {
list($defaults['start_date'], $defaults['start_date_time']) = CRM_Utils_Date::setDateDefaults($defaults['start_date']);
}
}
$defaults['for_organization'] = ts('I am contributing on behalf of an organization.');
}
- if (CRM_Utils_Array::value('recur_frequency_unit', $defaults)) {
+ if (!empty($defaults['recur_frequency_unit'])) {
$defaults['recur_frequency_unit'] = array_fill_keys(explode(CRM_Core_DAO::VALUE_SEPARATOR,
$defaults['recur_frequency_unit']
), '1');
$defaults['recur_frequency_unit'] = array('month' => 1);
}
- if (CRM_Utils_Array::value('is_for_organization', $defaults)) {
+ if (!empty($defaults['is_for_organization'])) {
$defaults['is_organization'] = 1;
}
else {
}
}
+ /**
+ * Use the form name to create the tpl file name
+ *
+ * @return string
+ * @access public
+ */
+ /**
+ * @return string
+ */
function getTemplateFileName() {
if ($this->controller->getPrint() || $this->getVar('_id') <= 0 ||
($this->_action & CRM_Core_Action::DELETE) ||