Commit 4c9b6178 authored by totten's avatar totten

INFRA-132 - Change "else if" to "elseif"

parent 4f99ca55
......@@ -1738,7 +1738,7 @@ WHERE contact_id = $contactId
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 {
......
......@@ -244,11 +244,11 @@ class CRM_Activity_BAO_Query {
$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');
}
......
......@@ -158,7 +158,7 @@ class CRM_Campaign_Form_Survey extends CRM_Core_Form {
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}"));
......
......@@ -257,7 +257,7 @@ class CRM_Case_Form_CaseView extends CRM_Core_Form {
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 );
......
......@@ -941,7 +941,7 @@ WHERE id={$id}; ";
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;
......@@ -2244,7 +2244,7 @@ ORDER BY civicrm_email.is_primary DESC";
}
}
}
else if (in_array($key,
elseif (in_array($key,
array(
'nick_name',
'job_title',
......
......@@ -382,7 +382,7 @@ WHERE (( contact_id_a = %1 AND contact_id_b = %2 AND is_permission_a_b = 1 ) OR
// 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);
......
......@@ -306,12 +306,12 @@ WHERE id IN ( $groupIDs )
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]);
}
......
......@@ -1311,7 +1311,7 @@ class CRM_Contact_BAO_Query {
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
......@@ -1478,11 +1478,11 @@ class CRM_Contact_BAO_Query {
$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';
}
......@@ -2756,7 +2756,7 @@ class CRM_Contact_BAO_Query {
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 . "%')";
......@@ -3666,7 +3666,7 @@ WHERE id IN ( $groupIDs )
if ($op == '=') {
$op = 'IN';
}
else if ($op == '!=') {
elseif ($op == '!=') {
$op = 'NOT IN';
}
else {
......@@ -3722,7 +3722,7 @@ WHERE id IN ( $groupIDs )
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);
......@@ -3749,7 +3749,7 @@ WHERE id IN ( $groupIDs )
if ($op == '=') {
$op = 'IN';
}
else if ($op == '!=') {
elseif ($op == '!=') {
$op = 'NOT IN';
}
else {
......@@ -3759,7 +3759,7 @@ WHERE id IN ( $groupIDs )
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';
}
......@@ -5490,7 +5490,7 @@ AND displayRelType.is_active = 1
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);
......
......@@ -82,10 +82,10 @@ class CRM_Contact_Controller_Search extends CRM_Core_Controller {
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'])
) {
......
......@@ -154,7 +154,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search {
$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);
}
......
......@@ -152,7 +152,7 @@ $sqlStatement
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;
......
......@@ -1148,7 +1148,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser {
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 {
......
......@@ -2871,7 +2871,7 @@ WHERE contribution_id = %1 ";
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
) {
......@@ -2880,7 +2880,7 @@ WHERE contribution_id = %1 ";
$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
......@@ -3612,7 +3612,7 @@ WHERE con.id = {$contributionId}
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';
......@@ -3648,7 +3648,7 @@ WHERE con.id = {$contributionId}
}
$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) {
......
......@@ -383,13 +383,13 @@ class CRM_Contribute_BAO_Query {
$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;
......
......@@ -898,7 +898,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
$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;
......
......@@ -78,7 +78,7 @@ class CRM_Contribute_Form_Contribution_OnBehalfOf {
$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;
}
......
......@@ -423,7 +423,7 @@ class CRM_Contribute_Form_UpdateBilling extends CRM_Core_Form {
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));
......
......@@ -309,7 +309,7 @@ class CRM_Contribute_Form_UpdateSubscription extends CRM_Core_Form {
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
......
......@@ -353,7 +353,7 @@ class CRM_Contribute_Page_Tab extends CRM_Core_Page {
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 {
......
......@@ -402,7 +402,7 @@ class CRM_Core_BAO_ConfigSetting {
$config->imageUploadDir
);
}
else if ($config->userFramework == 'WordPress') {
elseif ($config->userFramework == 'WordPress') {
$url = preg_replace(
'|wp-content/plugins/civicrm/civicrm/|',
'',
......
......@@ -236,7 +236,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
// get params by ID
$this->schedule = $this->getScheduleParams($this->scheduleId);
}
else if (!empty($this->scheduleFormValues)) {
elseif (!empty($this->scheduleFormValues)) {
$this->schedule = $this->mapFormValuesToDB($this->scheduleFormValues);
}
......@@ -435,7 +435,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
if ($mode == '1') { // MODE = SINGLE
$query .= " AND entity_id = %3";
}
else if ($mode == '2') { // MODE = FUTURE
elseif ($mode == '2') { // MODE = FUTURE
$recurringEntityID = CRM_Core_DAO::singleValueQuery("SELECT id FROM civicrm_recurring_entity WHERE entity_id = %3 AND entity_table = %2", $queryParams);
if ($recurringEntityID) {
$query .= $includeParent ? " AND id >= %4" : " AND id > %4";
......@@ -1018,7 +1018,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
$concatStartActionDateBits = $startActionDate1.strtoupper(substr($startActionDate[1], 0, 2));
$r->byday(array($concatStartActionDateBits));
}
else if ($scheduleReminderDetails['limit_to']) {
elseif ($scheduleReminderDetails['limit_to']) {
$r->bymonthday(array($scheduleReminderDetails['limit_to']));
}
}
......
......@@ -735,7 +735,7 @@ class CRM_Core_BAO_Setting extends CRM_Core_DAO_Setting {
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;
}
......
......@@ -2159,7 +2159,7 @@ AND ( entity_id IS NULL OR entity_id <= 0 )
$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 -')
......
......@@ -609,7 +609,7 @@ class CRM_Core_Error extends PEAR_ErrorStack {
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 );
}
}
......
......@@ -1587,7 +1587,7 @@ class CRM_Core_Form extends HTML_QuickForm_Page {
}
}
// 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;
}
......
......@@ -256,7 +256,7 @@ class CRM_Core_Form_RecurringEntity {
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');
}
}
......
......@@ -214,7 +214,7 @@ class CRM_Event_Page_Tab extends CRM_Core_Page {
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 {
......
......@@ -235,7 +235,7 @@ class CRM_Export_BAO_Export {
if ($fieldName == 'event_id') {
$returnProperties['event_id'] = 1;
}
else if (
elseif (
$exportMode == CRM_Export_Form_Select::EVENT_EXPORT &&
array_key_exists($fieldName, self::componentPaymentFields())
) {
......
......@@ -163,7 +163,7 @@ class CRM_Financial_Form_Export extends CRM_Core_Form {
if ($this->_id) {
$batchIds = array($this->_id);
}
else if (!empty($this->_batchIds)) {
elseif (!empty($this->_batchIds)) {
$batchIds = explode(',', $this->_batchIds);
}
// Recalculate totals
......
......@@ -305,7 +305,7 @@ class CRM_Friend_Form extends CRM_Core_Form {
$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'] ) ) {
......
......@@ -450,12 +450,12 @@ WHERE table_schema IN ('{$this->db}', '{$civiDB}')";
// 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;
......
......@@ -113,7 +113,7 @@ class CRM_Mailing_Form_Optout extends CRM_Core_Form {
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.',
......
......@@ -133,7 +133,7 @@ class CRM_Mailing_Form_Unsubscribe extends CRM_Core_Form {
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.',
......
......@@ -374,7 +374,7 @@ class CRM_Member_Form_MembershipType extends CRM_Member_Form_MembershipConfig {
$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']);
}
......
......@@ -320,7 +320,7 @@ class CRM_Member_Import_Parser_Membership extends CRM_Member_Import_Parser {
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);
}
}
......
......@@ -378,7 +378,7 @@ class CRM_Price_BAO_PriceField extends CRM_Price_DAO_PriceField {
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>';
}
......@@ -788,7 +788,7 @@ WHERE id IN (" . implode(',', array_keys($priceFields)) . ')';
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>';
}
......
......@@ -771,7 +771,7 @@ class CRM_Profile_Form extends CRM_Core_Form {
if ($this->_currentUserID) {
$this->_isAddCaptcha = FALSE;
}
else if (!$this->_isAddCaptcha && !empty($addCaptcha)) {
elseif (!$this->_isAddCaptcha && !empty($addCaptcha)) {
$this->_isAddCaptcha = TRUE;
}
......
......@@ -99,7 +99,7 @@ class CRM_Report_BAO_ReportInstance extends CRM_Report_DAO_ReportInstance {
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 {
......
......@@ -1032,7 +1032,7 @@ class CRM_Report_Form extends CRM_Core_Form {
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,
......
......@@ -344,7 +344,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
}
}
}
else if ($recordType == 'assignee') {
elseif ($recordType == 'assignee') {
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_target.') ||
strstr($clause, 'civicrm_contact_source.') ||
......@@ -356,7 +356,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
}
}
}
else if ($recordType == 'source') {
elseif ($recordType == 'source') {
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_target.') ||
strstr($clause, 'civicrm_contact_assignee.') ||
......@@ -368,7 +368,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form {
}
}
}
else if ($recordType == 'final') {
elseif ($recordType == 'final') {
$this->_selectClauses = $this->_selectAliasesTotal;
foreach ($this->_selectClauses as $key => $clause) {
if (strstr($clause, 'civicrm_contact_contact_target') ||
......@@ -640,7 +640,7 @@ GROUP BY civicrm_activity_id {$this->_having} {$this->_orderBy}";
) {
$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 ";
......
......@@ -384,7 +384,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form {
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
......
......@@ -593,7 +593,7 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency";
) {
$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)";
......@@ -890,7 +890,7 @@ WHERE civicrm_contribution_contribution_id={$row['civicrm_contribution_contribu
) {
$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';
......
......@@ -314,7 +314,7 @@ LEFT JOIN civicrm_phone {$this->_aliases['civicrm_phone']}
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') {
......
......@@ -624,7 +624,7 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_
$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'];
}
......@@ -640,7 +640,7 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_
$graphRows['barKeys'][1] = ts('Soft Credits');
$graphRows['legend'] = ts('Contributions and Soft Credits');
}
else if ($softContrib) {
elseif ($softContrib) {
$graphRows['legend'] = ts('Soft Credits');
}
......
......@@ -262,7 +262,7 @@ class CRM_Report_Form_Instance {
$defaults['grouprole'] = $grouproles;
}
}
else if (property_exists($form, '_description')) {
elseif (property_exists($form, '_description')) {
$defaults['description'] = $form->_description;
}
}
......
......@@ -1147,7 +1147,7 @@ AND cli.entity_table = 'civicrm_contribution' AND cli.id IN (" . implode(',', $v
$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']);
}
......
......@@ -109,7 +109,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Set extends CRM_Upgrade_Snapshot_V4p2_