if ($dao->record_type_id == $targetID) {
$activities[$dao->activity_id]['targets'][$contactId] = $contactId;
}
- else if ($dao->record_type_id == $assigneeID) {
+ elseif ($dao->record_type_id == $assigneeID) {
$activities[$dao->activity_id]['asignees'][$contactId] = $contactId;
}
else {
$query->_where[$grouping][] = " civicrm_activity_contact.record_type_id = $sourceID";
$query->_qill[$grouping][] = ts('Activity created by');
}
- else if ($values[2] == 2) {
+ elseif ($values[2] == 2) {
$query->_where[$grouping][] = " civicrm_activity_contact.record_type_id = $assigneeID";
$query->_qill[$grouping][] = ts('Activity assigned to');
}
- else if ($values[2] == 3) {
+ elseif ($values[2] == 3) {
$query->_where[$grouping][] = " civicrm_activity_contact.record_type_id = $targetID";
$query->_qill[$grouping][] = ts('Activity targeted to');
}
if ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_done") {
CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/campaign', 'reset=1&subPage=survey'));
}
- else if ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_next") {
+ elseif ($this->controller->getButtonName('submit') == "_qf_{$className}_upload_next") {
$subPage = CRM_Campaign_Form_Survey_TabHeader::getNextTab($this);
CRM_Utils_System::redirect(CRM_Utils_System::url("civicrm/survey/configure/{$subPage}",
"action=update&reset=1&id={$this->_surveyId}"));
FALSE, NULL, FALSE
);
}
- else if ($type == $pdfActivityType ) {
+ elseif ($type == $pdfActivityType ) {
$url = CRM_Utils_System::url('civicrm/activity/pdf/add',
"action=add&context=standalone&reset=1&cid={$this->_contactID}&caseid={$this->_caseID}&atype=$type",
FALSE, NULL, FALSE );
str_replace('\\', '/', $absolutePath)
);
}
- else if ($config->userFramework == 'WordPress') {
+ elseif ($config->userFramework == 'WordPress') {
$userFrameworkBaseURL = trim(str_replace('/wp-admin/', '', $config->userFrameworkBaseURL));
$customFileUploadDirectory = strstr(str_replace('\\', '/', $absolutePath), '/wp-content/');
$relativePath = $userFrameworkBaseURL . $customFileUploadDirectory;
}
}
}
- else if (in_array($key,
+ elseif (in_array($key,
array(
'nick_name',
'job_title',
// if result is already validated, and url has cs, set the flag.
$session->set('authSrc', CRM_Core_Permission::AUTH_SRC_CHECKSUM);
}
- else if (($session->get('authSrc') & CRM_Core_Permission::AUTH_SRC_CHECKSUM) == CRM_Core_Permission::AUTH_SRC_CHECKSUM) {
+ elseif (($session->get('authSrc') & CRM_Core_Permission::AUTH_SRC_CHECKSUM) == CRM_Core_Permission::AUTH_SRC_CHECKSUM) {
// if checksum wasn't present in REQUEST OR checksum result validated as FALSE,
// and flag was already set exactly as AUTH_SRC_CHECKSUM, unset it.
$session->set('authSrc', CRM_Core_Permission::AUTH_SRC_UNKNOWN);
if ($groupID == NULL) {
$invoked = TRUE;
}
- else if (is_array($groupID)) {
+ elseif (is_array($groupID)) {
foreach ($groupID as $gid) {
unset(self::$_alreadyLoaded[$gid]);
}
}
- else if ($groupID && array_key_exists($groupID, self::$_alreadyLoaded)) {
+ elseif ($groupID && array_key_exists($groupID, self::$_alreadyLoaded)) {
unset(self::$_alreadyLoaded[$groupID]);
}
if (isset($this->_rowCountClause)) {
$select = "SELECT {$this->_rowCountClause}";
}
- else if (isset($this->_distinctComponentClause)) {
+ elseif (isset($this->_distinctComponentClause)) {
// we add distinct to get the right count for components
// for the more complex result set, we use GROUP BY the same id
// CRM-9630
$fromRange = 'event_start_date_low';
$toRange = 'event_end_date_high';
}
- else if ($id == 'case_from_relative') {
+ elseif ($id == 'case_from_relative') {
$fromRange = 'case_from_start_date_low';
$toRange = 'case_from_start_date_high';
}
- else if ($id == 'case_to_relative') {
+ elseif ($id == 'case_to_relative') {
$fromRange = 'case_to_end_date_low';
$toRange = 'case_to_end_date_high';
}
if (strpos($op, 'NULL') !== FALSE || strpos($op, 'EMPTY') !== FALSE) {
$this->_where[$grouping][] = self::buildClause($alias, $op, $value, 'String');
}
- else if (is_array($value)) {
+ elseif (is_array($value)) {
foreach ($value as $k => $v) {
if (!empty($k)) {
$clause[$k] = "($alias $op '%" . CRM_Core_DAO::VALUE_SEPARATOR . CRM_Utils_Type::escape($k, 'String') . CRM_Core_DAO::VALUE_SEPARATOR . "%')";
if ($op == '=') {
$op = 'IN';
}
- else if ($op == '!=') {
+ elseif ($op == '!=') {
$op = 'NOT IN';
}
else {
if (in_array($op, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {
$value = NULL;
}
- else if (!is_array($value)) {
+ elseif (!is_array($value)) {
// force the state to be an array
// check if its in the mapper format!
$values = self::parseSearchBuilderString($value);
if ($op == '=') {
$op = 'IN';
}
- else if ($op == '!=') {
+ elseif ($op == '!=') {
$op = 'NOT IN';
}
else {
if (in_array($op, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {
$stateClause = "civicrm_address.state_province_id $op";
}
- else if ($inputFormat == 'id') {
+ elseif ($inputFormat == 'id') {
if ($op != 'NOT IN') {
$op = 'IN';
}
if ($dataType == 'Integer' && !is_numeric($v)) {
return FALSE;
}
- else if ($dataType == 'String' && !is_string($v)) {
+ elseif ($dataType == 'String' && !is_string($v)) {
return FALSE;
}
$returnValues[] = trim($v);
if (strpos($qString, 'basic') !== FALSE) {
$path = 'civicrm/contact/search/basic';
}
- else if (strpos($qString, 'builder') !== FALSE) {
+ elseif (strpos($qString, 'builder') !== FALSE) {
$path = 'civicrm/contact/search/builder';
}
- else if (
+ elseif (
strpos($qString, 'custom') !== FALSE &&
isset($_REQUEST['csid'])
) {
$c->buildAdvancedSearchPaneForm($this);
$this->_paneTemplatePath[$type] = $c->getAdvancedSearchPaneTemplatePath();
}
- else if (in_array($type, $hookPanes)) {
+ elseif (in_array($type, $hookPanes)) {
CRM_Contact_BAO_Query_Hook::singleton()->buildAdvancedSearchPaneForm($this, $type);
CRM_Contact_BAO_Query_Hook::singleton()->setAdvancedSearchPaneTemplatePath($this->_paneTemplatePath, $type);
}
CRM_Core_DAO::executeQuery($sql);
}
}
- else if ($tableName == 'file') {
+ elseif ($tableName == 'file') {
$searcher = CRM_Core_BAO_File::getSearchService();
if (!($searcher && CRM_Core_Permission::check('access uploaded files'))) {
continue;
if (array_key_exists($customFieldID, $addressCustomFields) && CRM_Utils_Date::convertToDefaultDate($params[$key][0], $dateType, $key)) {
$value = $params[$key][0][$key];
}
- else if (CRM_Utils_Date::convertToDefaultDate($params, $dateType, $key)) {
+ elseif (CRM_Utils_Date::convertToDefaultDate($params, $dateType, $key)) {
$value = $params[$key];
}
else {
self::updateFinancialAccounts($params, 'changePaymentInstrument');
}
}
- else if ((!CRM_Utils_System::isNull($params['contribution']->payment_instrument_id) ||
+ elseif ((!CRM_Utils_System::isNull($params['contribution']->payment_instrument_id) ||
!CRM_Utils_System::isNull($params['prevContribution']->payment_instrument_id)) &&
$params['contribution']->payment_instrument_id != $params['prevContribution']->payment_instrument_id
) {
$params['total_amount'] = $params['trxnParams']['total_amount'] = $trxnParams['total_amount'];
self::updateFinancialAccounts($params, 'changePaymentInstrument');
}
- else if (!CRM_Utils_System::isNull($params['contribution']->check_number) &&
+ elseif (!CRM_Utils_System::isNull($params['contribution']->check_number) &&
$params['contribution']->check_number != $params['prevContribution']->check_number
) {
// another special case when check number is changed, create new financial records
if (!isset($params['financial_type_id'])) {
$params['financial_type_id'] = $prevContributionValue->financial_type_id;
}
- else if (isset($params['financial_type_id']) && !array_key_exists($params['financial_type_id'], $taxRates)) {
+ elseif (isset($params['financial_type_id']) && !array_key_exists($params['financial_type_id'], $taxRates)) {
// Assisn tax Amount on update of contrbution
if (!empty($prevContributionValue->tax_amount)) {
$params['tax_amount'] = 'null';
}
$params['total_amount'] = $params['total_amount'] + $params['tax_amount'];
}
- else if (isset($params['api.line_item.create'])) {
+ elseif (isset($params['api.line_item.create'])) {
// Update total amount of contribution using lineItem
$taxAmountArray = array();
foreach ($params['api.line_item.create'] as $key => $value) {
$query->_tables['civicrm_contribution'] = $query->_whereTables['civicrm_contribution'] = 1;
$query->_tables['civicrm_contribution_soft'] = $query->_whereTables['civicrm_contribution_soft'] = 1;
}
- else if ($value == 'both_related') {
+ elseif ($value == 'both_related') {
$query->_where[$grouping][] = "contribution_search_scredit_combined.filter_id IS NOT NULL";
$query->_qill[$grouping][] = ts('Contributions OR Soft Credits? - Soft Credits with related Hard Credit');
$query->_tables['civicrm_contribution'] = $query->_whereTables['civicrm_contribution'] = 1;
$query->_tables['civicrm_contribution_soft'] = $query->_whereTables['civicrm_contribution_soft'] = 1;
}
- else if ($value == 'both') {
+ elseif ($value == 'both') {
$query->_qill[$grouping][] = ts('Contributions OR Soft Credits? - Both');
$query->_tables['civicrm_contribution'] = $query->_whereTables['civicrm_contribution'] = 1;
$query->_tables['civicrm_contribution_soft'] = $query->_whereTables['civicrm_contribution_soft'] = 1;
$this->_params, $ufFields
);
}
- else if (!empty($this->_membershipContactID) && $contactID != $this->_membershipContactID) {
+ elseif (!empty($this->_membershipContactID) && $contactID != $this->_membershipContactID) {
// this is an onbehalf renew case for inherited membership. For e.g a permissioned member of household,
// store current user id as related contact for later use for mailing / activity..
$this->_values['related_contact'] = $contactID;
$form->_relatedOrganizationFound = TRUE;
}
}
- else if (!empty($form->_employers)) {
+ elseif (!empty($form->_employers)) {
// not a renewal case and _employers list is not empty
$form->_relatedOrganizationFound = TRUE;
}
if ( $userID && $status) {
$session->setStatus($status, $msgTitle, $msgType);
}
- else if (!$userID) {
+ elseif (!$userID) {
if ($status)
CRM_Utils_System::setUFMessage($status);
$result = (int) ($updateSubscription && isset($ctype));
if ( $userID && $status) {
CRM_Core_Session::setStatus($status, $msgTitle, $msgType);
}
- else if (!$userID) {
+ elseif (!$userID) {
if ($status)
CRM_Utils_System::setUFMessage($status);
// keep result as 1, since we not displaying anything on the redirected page anyway
if ($context == 'advanced') {
$url = CRM_Utils_System::url('civicrm/contact/search/advanced', $extraParams);
}
- else if ($searchContext) {
+ elseif ($searchContext) {
$url = CRM_Utils_System::url("civicrm/$searchContext/search", $extraParams);
}
else {
$config->imageUploadDir
);
}
- else if ($config->userFramework == 'WordPress') {
+ elseif ($config->userFramework == 'WordPress') {
$url = preg_replace(
'|wp-content/plugins/civicrm/civicrm/|',
'',
// get params by ID\r
$this->schedule = $this->getScheduleParams($this->scheduleId);\r
}\r
- else if (!empty($this->scheduleFormValues)) {\r
+ elseif (!empty($this->scheduleFormValues)) {\r
$this->schedule = $this->mapFormValuesToDB($this->scheduleFormValues);\r
}\r
\r
if ($mode == '1') { // MODE = SINGLE\r
$query .= " AND entity_id = %3";\r
}\r
- else if ($mode == '2') { // MODE = FUTURE\r
+ elseif ($mode == '2') { // MODE = FUTURE\r
$recurringEntityID = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_recurring_entity WHERE entity_id = %3 AND entity_table = %2", $queryParams);\r
if ($recurringEntityID) {\r
$query .= $includeParent ? " AND id >= %4" : " AND id > %4";\r
$concatStartActionDateBits = $startActionDate1.strtoupper(substr($startActionDate[1], 0, 2));\r
$r->byday(array($concatStartActionDateBits));\r
}\r
- else if ($scheduleReminderDetails['limit_to']) {\r
+ elseif ($scheduleReminderDetails['limit_to']) {\r
$r->bymonthday(array($scheduleReminderDetails['limit_to']));\r
}\r
}\r
if (empty($filters)) {
return;
}
- else if (array_keys($filters) == array('name')) {
+ elseif (array_keys($filters) == array('name')) {
$settingSpec = array($filters['name'] => CRM_Utils_Array::value($filters['name'], $settingSpec, ''));
return;
}
$form->add('select', $name, $title,
array('' => ts('- select -')) + CRM_Contribute_PseudoConstant::paymentInstrument(), $required);
}
- else if ($fieldName == 'financial_type') {
+ elseif ($fieldName == 'financial_type') {
$form->add('select', $name, $title,
array(
'' => ts('- select -')
if ( CIVICRM_DEBUG_LOG_QUERY == 'backtrace' ) {
CRM_Core_Error::backtrace( $string, TRUE );
}
- else if ( CIVICRM_DEBUG_LOG_QUERY ) {
+ elseif ( CIVICRM_DEBUG_LOG_QUERY ) {
CRM_Core_Error::debug_var( 'Query', $string, FALSE, TRUE );
}
}
}
}
// check if user has permission, CRM-12062
- else if ($tempID && CRM_Contact_BAO_Contact_Permission::allow($tempID)) {
+ elseif ($tempID && CRM_Contact_BAO_Contact_Permission::allow($tempID)) {
return $tempID;
}
if (empty($values['start_action_offset'])) {
$errors['start_action_offset'] = ts('This is a required field');
}
- else if ($values['start_action_offset'] > 30) {
+ elseif ($values['start_action_offset'] > 30) {
$errors['start_action_offset'] = ts('Occurrences should be less than or equal to 30');
}
}
if ($compContext == 'advanced') {
$url = CRM_Utils_System::url('civicrm/contact/search/advanced', $urlParams);
}
- else if ($searchContext) {
+ elseif ($searchContext) {
$url = CRM_Utils_System::url("civicrm/$searchContext/search", $urlParams);
}
else {
if ($fieldName == 'event_id') {
$returnProperties['event_id'] = 1;
}
- else if (
+ elseif (
$exportMode == CRM_Export_Form_Select::EVENT_EXPORT &&
array_key_exists($fieldName, self::componentPaymentFields())
) {
if ($this->_id) {
$batchIds = array($this->_id);
}
- else if (!empty($this->_batchIds)) {
+ elseif (!empty($this->_batchIds)) {
$batchIds = explode(',', $this->_batchIds);
}
// Recalculate totals
$this->assign('linkText', $linkText);
}
}
- else if ( $this->_entityTable == 'civicrm_event' ) {
+ elseif ( $this->_entityTable == 'civicrm_event' ) {
// If this is tell a friend after registering for an event, give donor link to create their own fundraising page
require_once 'CRM/PCP/BAO/PCP.php';
if ( $linkText = CRM_PCP_BAO_PCP::getPcpBlockStatus( $defaults['entity_id'], $defaults['entity_table'] ) ) {
// if data-type is different, surely consider the column
$diff['MODIFY'][] = $col;
}
- else if ($civiTableSpecs[$col]['IS_NULLABLE'] != CRM_Utils_Array::value('IS_NULLABLE', $logTableSpecs[$col]) &&
+ elseif ($civiTableSpecs[$col]['IS_NULLABLE'] != CRM_Utils_Array::value('IS_NULLABLE', $logTableSpecs[$col]) &&
$logTableSpecs[$col]['IS_NULLABLE'] == 'NO') {
// if is-null property is different, and log table's column is NOT-NULL, surely consider the column
$diff['MODIFY'][] = $col;
}
- else if ($civiTableSpecs[$col]['COLUMN_DEFAULT'] != CRM_Utils_Array::value('COLUMN_DEFAULT', $logTableSpecs[$col]) &&
+ elseif ($civiTableSpecs[$col]['COLUMN_DEFAULT'] != CRM_Utils_Array::value('COLUMN_DEFAULT', $logTableSpecs[$col]) &&
!strstr($civiTableSpecs[$col]['COLUMN_DEFAULT'], 'TIMESTAMP')) {
// if default property is different, and its not about a timestamp column, consider it
$diff['MODIFY'][] = $col;
CRM_Core_Session::setStatus( $statusMsg, '', 'success' );
}
- else if ($result == FALSE) {
+ elseif ($result == FALSE) {
// Email address not verified
$statusMsg = ts('The email address: %1 you have entered does not match the email associated with this opt out request.',
CRM_Core_Session::setStatus( $statusMsg, '', 'success' );
}
- else if ($result == FALSE) {
+ elseif ($result == FALSE) {
// Email address not verified
$statusMsg = ts('The email address: %1 you have entered does not match the email associated with this unsubscribe request.',
$dat = ($dat < 10) ? '0' . $dat : $dat;
$params[$per] = $mon . $dat;
}
- else if($per == 'fixed_period_rollover_day' && !empty($params['month_fixed_period_rollover_day'])) {
+ elseif($per == 'fixed_period_rollover_day' && !empty($params['month_fixed_period_rollover_day'])) {
$params['fixed_period_rollover_day'] = $params['month_fixed_period_rollover_day']['d'];
unset($params['month_fixed_period_rollover_day']);
}
CRM_Contact_Import_Parser_Contact::formatCustomDate($params, $formatted, $dateType, $key);
unset($params[$key]);
}
- else if ( $customFields[$customFieldID]['data_type'] == 'Boolean' ) {
+ elseif ( $customFields[$customFieldID]['data_type'] == 'Boolean' ) {
$params[$key] = CRM_Utils_String::strtoboolstr($val);
}
}
if ($displayOpt == 'Do_not_show') {
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>';
}
- else if ($displayOpt == 'Inclusive') {
+ elseif ($displayOpt == 'Inclusive') {
$opt['label'] = '<span class="crm-price-amount-label">' . $opt['label'] . '</span>' . '<span class="crm-price-amount-amount">' . CRM_Utils_Money::format($opt[$valueFieldName] + $taxAmount) . '</span>';
$opt['label'] .= '<span class="crm-price-amount-tax"> (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')</span>';
}
if ($displayOpt == 'Do_not_show') {
$label = CRM_Utils_Money::format($opt[$valueFieldName] + $opt['tax_amount']);
}
- else if ($displayOpt == 'Inclusive') {
+ elseif ($displayOpt == 'Inclusive') {
$label = CRM_Utils_Money::format($opt[$valueFieldName] + $opt['tax_amount']);
$label .= '<span class="crm-price-amount-tax"> (includes ' . $taxTerm . ' of ' . CRM_Utils_Money::format($opt['tax_amount']) . ')</span>';
}
if ($this->_currentUserID) {
$this->_isAddCaptcha = FALSE;
}
- else if (!$this->_isAddCaptcha && !empty($addCaptcha)) {
+ elseif (!$this->_isAddCaptcha && !empty($addCaptcha)) {
$this->_isAddCaptcha = TRUE;
}
if ($reportID = CRM_Utils_Array::value('report_id', $params)) {
$instance->report_id = $reportID;
}
- else if ($instanceID) {
+ elseif ($instanceID) {
$instance->report_id = CRM_Report_Utils_Report::getValueFromUrl($instanceID);
}
else {
if ($field['type'] == 'select') {
$this->addElement('select', "{$fieldName}", $field['title'], $field['options']);
}
- else if ($field['type'] == 'checkbox') {
+ elseif ($field['type'] == 'checkbox') {
$options[$field['title']] = $fieldName;
$this->addCheckBox($fieldName, NULL,
$options, NULL,
}
}
}
- else if ($recordType == 'assignee') {
+ elseif ($recordType == 'assignee') {
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_target.') ||
strstr($clause, 'civicrm_contact_source.') ||
}
}
}
- else if ($recordType == 'source') {
+ elseif ($recordType == 'source') {
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_target.') ||
strstr($clause, 'civicrm_contact_assignee.') ||
}
}
}
- else if ($recordType == 'final') {
+ elseif ($recordType == 'final') {
$this->_selectClauses = $this->_selectAliasesTotal;
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_contact_target') ||
) {
$nullFilters[] = " civicrm_contact_contact_{$type}_id IS NOT NULL ";
}
- else if (CRM_Utils_Array::value("contact_{$type}_op", $this->_params) ==
+ elseif (CRM_Utils_Array::value("contact_{$type}_op", $this->_params) ==
'nll'
) {
$nullFilters[] = " civicrm_contact_contact_{$type}_id IS NULL ";
ELSE financial_account_civireport_credit_2.accounting_code
END";
}
- else if ($fieldName == 'credit_name') {
+ elseif ($fieldName == 'credit_name') {
$field['dbAlias'] = "CASE
WHEN financial_trxn_civireport.from_financial_account_id IS NOT NULL
THEN financial_account_civireport_credit_1.id
) {
$tempQuery = "(SELECT * FROM civireport_contribution_detail_temp1)";
}
- else if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
+ elseif (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
'soft_credits_only'
) {
$tempQuery = "(SELECT * FROM civireport_contribution_detail_temp2)";
) {
$title = '%1 contributions: %2';
}
- else if (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
+ elseif (CRM_Utils_Array::value('contribution_or_soft_value', $this->_params) ==
'soft_credits_only'
) {
$title = '%1 soft-credits: %2';
ON {$this->_aliases['civicrm_contact']}.id = {$this->_aliases['civicrm_phone']}.contact_id AND {$this->_aliases['civicrm_phone']}.is_primary = 1";
}
- else if ($fromTable == 'civicrm_financial_type') {
+ elseif ($fromTable == 'civicrm_financial_type') {
$contriCol = "financial_type_id";
}
elseif ($fromTable == 'civicrm_contribution') {
$graphRows['multiValue'][0][] = $row['civicrm_contribution_total_amount_sum'];
$graphRows['multiValue'][1][] = $row['civicrm_contribution_soft_soft_amount_sum'];
}
- else if ($softContrib) {
+ elseif ($softContrib) {
// only soft contributions
$graphRows['multiValue'][0][] = $row['civicrm_contribution_soft_soft_amount_sum'];
}
$graphRows['barKeys'][1] = ts('Soft Credits');
$graphRows['legend'] = ts('Contributions and Soft Credits');
}
- else if ($softContrib) {
+ elseif ($softContrib) {
$graphRows['legend'] = ts('Soft Credits');
}
$defaults['grouprole'] = $grouproles;
}
}
- else if (property_exists($form, '_description')) {
+ elseif (property_exists($form, '_description')) {
$defaults['description'] = $form->_description;
}
}
$formValues[$value]['financial_type_id'] = $formValues[$value]['contribution_type_id'];
unset($formValues[$value]['contribution_type_id']);
}
- else if (array_key_exists('contribution_type', $formValues[$value])) {
+ elseif (array_key_exists('contribution_type', $formValues[$value])) {
$formValues[$value]['financial_type'] = $formValues[$value]['contribution_type'];
unset($formValues[$value]['contribution_type']);
}
if ($entity == 'contribution') {
$entityName = 'default_contribution_amount';
}
- else if ($entity == 'membership') {
+ elseif ($entity == 'membership') {
$entityName = 'default_membership_type_amount';
}
if (defined('CIVICRM_USE_MEMCACHE') && CIVICRM_USE_MEMCACHE) {
$className = 'Memcache';
}
- else if (defined('CIVICRM_USE_ARRAYCACHE') && CIVICRM_USE_ARRAYCACHE) {
+ elseif (defined('CIVICRM_USE_ARRAYCACHE') && CIVICRM_USE_ARRAYCACHE) {
$className = 'ArrayCache';
}
- else if (defined('CIVICRM_DB_CACHE_CLASS') && CIVICRM_DB_CACHE_CLASS) {
+ elseif (defined('CIVICRM_DB_CACHE_CLASS') && CIVICRM_DB_CACHE_CLASS) {
$className = CIVICRM_DB_CACHE_CLASS;
}
if (!isset($svq)) {
return civicrm_api3_create_error("Invalid Contact ID: There is no contact record with contact_id = $value.");
}
- else if ($svq == 1) {
+ elseif ($svq == 1) {
return civicrm_api3_create_error("Invalid Contact ID: contact_id $value is a soft-deleted contact.");
}
$error = new Exception($content);
JErrorPage::render($error);
}
- else if (class_exists('JError')) {
+ elseif (class_exists('JError')) {
JError::raiseError('CiviCRM-001', $content);
}
else {
if ($mem < $min && $mem > 0) {
$results['severity'] = $this::REQUIREMENT_ERROR;
}
- else if ($mem < $recommended && $mem != 0) {
+ elseif ($mem < $recommended && $mem != 0) {
$results['severity'] = $this::REQUIREMENT_WARNING;
}
- else if ($mem == 0) {
+ elseif ($mem == 0) {
$results['details'] = "Cannot determine PHP memory allocation. Install only if you're sure you've allocated at least 32 MB.";
$results['severity'] = $this::REQUIREMENT_WARNING;
}