INFRA-132 - Change "else if" to "elseif"
authorTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 04:17:30 +0000 (20:17 -0800)
committerTim Otten <totten@civicrm.org>
Wed, 7 Jan 2015 04:17:30 +0000 (20:17 -0800)
51 files changed:
CRM/Activity/BAO/Activity.php
CRM/Activity/BAO/Query.php
CRM/Campaign/Form/Survey.php
CRM/Case/Form/CaseView.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Contact/Permission.php
CRM/Contact/BAO/GroupContactCache.php
CRM/Contact/BAO/Query.php
CRM/Contact/Controller/Search.php
CRM/Contact/Form/Search/Advanced.php
CRM/Contact/Form/Search/Custom/FullText/AbstractPartialQuery.php
CRM/Contact/Import/Parser/Contact.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/Query.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/Contribution/OnBehalfOf.php
CRM/Contribute/Form/UpdateBilling.php
CRM/Contribute/Form/UpdateSubscription.php
CRM/Contribute/Page/Tab.php
CRM/Core/BAO/ConfigSetting.php
CRM/Core/BAO/RecurringEntity.php
CRM/Core/BAO/Setting.php
CRM/Core/BAO/UFGroup.php
CRM/Core/Error.php
CRM/Core/Form.php
CRM/Core/Form/RecurringEntity.php
CRM/Event/Page/Tab.php
CRM/Export/BAO/Export.php
CRM/Financial/Form/Export.php
CRM/Friend/Form.php
CRM/Logging/Schema.php
CRM/Mailing/Form/Optout.php
CRM/Mailing/Form/Unsubscribe.php
CRM/Member/Form/MembershipType.php
CRM/Member/Import/Parser/Membership.php
CRM/Price/BAO/PriceField.php
CRM/Profile/Form.php
CRM/Report/BAO/ReportInstance.php
CRM/Report/Form.php
CRM/Report/Form/Activity.php
CRM/Report/Form/Contribute/Bookkeeping.php
CRM/Report/Form/Contribute/Detail.php
CRM/Report/Form/Contribute/Repeat.php
CRM/Report/Form/Contribute/Summary.php
CRM/Report/Form/Instance.php
CRM/Upgrade/Incremental/php/FourThree.php
CRM/Upgrade/Snapshot/V4p2/Price/BAO/Set.php
CRM/Utils/Cache.php
CRM/Utils/DeprecatedUtils.php
CRM/Utils/System/Joomla.php
Civi/Install/Requirements.php

index 54172454895927a2306422dbfa3a1f031bc7610f..1324e97092af0687e0722a64b44550d1cd550bd7 100644 (file)
@@ -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 {
index 6276199b6a843cf5c8c5ada86defd0788460b378..abd533ba93cd90e5c1621ecfa6da261ee8c95003 100644 (file)
@@ -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');
           }
index 238a989a54e9486ce34f0917303ba9cd6ecd23af..3b6ef57ff8f091cfd92257c69aa931246567b2e1 100644 (file)
@@ -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}"));
index ccdf0df41dabc94732c51db65a91ed5e88c93983..2579cca46ce6567b5e6463aa8eb7f5b99599b601 100644 (file)
@@ -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 );
index 1477e1cc924101dac30ec4e3767f447564512404..eca106868129c4d15255583231acab08d5810002 100644 (file)
@@ -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',
index 61f2ce62f116eaaa60b7d1e81fff4d812f8456c9..45d625dd6e7c9dd8d2db9a24256f9b7e058c5fd8 100644 (file)
@@ -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);
index 0fe643e053b1d0301c62db89fe3a126ca2e5e7c2..06ad552753468b099638ae0c4d56ba760993a3a2 100644 (file)
@@ -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]);
     }
 
index ef0851b29f39a82e7f6079343301b4bfd20fccdb..d1b158e1729a403bf5edd6d9fce120cd4650c952 100644 (file)
@@ -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);
index 3fe4bf449704853f9b1752a3734bb2f1bb77e075..64eab805ba3ec457aa20d8c593d0e2ad1b69f804 100644 (file)
@@ -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'])
     ) {
index 4f452ddce02263b558445f186dbe16c91b5d75e3..61bcf5364b547be1555286989c9646513131ae3d 100644 (file)
@@ -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);
         }
index 72c4d6e9c028a587af0512ebd70d29507023b500..f4c5abcaa056215469adbef762e6c32a2320a623 100644 (file)
@@ -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;
index 6ba3beb7a47e12395c0c42959aaab3d663c48916..d356898256020bffcfc43e006df22ec4f27a6a22 100644 (file)
@@ -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 {
index 0431d495ec90d6490729626371aee179ef0b2715..758612be6ddfb0be5cfb4be1740dfdacad3da6eb 100644 (file)
@@ -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) {
index 288059850079c28d116515a5bf39a1cf9a3dd07b..06f22fceac2586d817b8cf95a952bc30a9380b92 100644 (file)
@@ -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;
index 09d03b80d73bc734a76b8fd1b7bb156a2e296843..5cd5c6f576fec1e0b35e9b5c1b6cdce8ba77aa6f 100644 (file)
@@ -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;
index d7200c797221073d2b1953e3e877ffbabf6af100..3670d508d85417043ed1777b73772be06a5b2306 100644 (file)
@@ -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;
       }
index 94879f1e295c75ab32e23f5f46e14be64c81bad8..8a84c63f7d41f6c62939b75a9fc26a160435be51 100644 (file)
@@ -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));
index 453617d7d475d9653f4f0655c631479faf42c62a..847d862899cb51c3fd43301d98ef4928711b77fa 100644 (file)
@@ -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
index 657f09441bbaa9763e73934b7596273c1c5777c4..608cbb55c8c1e3a61aefad6ebf407e80d119a6de 100644 (file)
@@ -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 {
index 48be9c9b49d5fabff31738734880f996cbe1c51f..2de616d0ee010c3e3886121ce21f4835609e7619 100644 (file)
@@ -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/|',
         '',
index 42b043e4c320cc834b770771a88c8d22e2795e22..ce90d1febfd27dce1a837eacfb899087355654b1 100644 (file)
@@ -236,7 +236,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
       // 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
@@ -435,7 +435,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
     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
@@ -1018,7 +1018,7 @@ class CRM_Core_BAO_RecurringEntity extends CRM_Core_DAO_RecurringEntity {
           $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
index 28e5a7c980d4a45b65ef32e385447964283909f5..ecbe53cfa3765fcfe6ff1253bee9ba62384e695e 100644 (file)
@@ -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;
     }
index 370e9fdd4b3fd7143ee41f549e0a438583a13963..928ca8d2931dacd76663ad1abe8ec096558f4d4f 100644 (file)
@@ -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 -')
index 0fc3f0531cef561ec0b84ed0f2fc69c405eb57a1..663bcc0d5444bbf3815f9e39f66f4ecc478b3797 100644 (file)
@@ -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 );
       }
     }
index 17d8cab18d271c03d1a3d479bcf2060895819bfd..336dc5e776c1f47eadb2bb7f4bf4b8ce82248188 100644 (file)
@@ -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;
     }
 
index 04a078e3821a755e4e7c561f6bee57904ce48ac8..d08158e21ac33d403d7418cf51280694c6fa0364 100644 (file)
@@ -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');
           }
         }
index 0aae4d128f98005615f56f1d7365fa5cde5d9abd..2eaa8dd3893f547a8ee4e5752d76b3a8a70201ec 100644 (file)
@@ -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 {
index 2ff4678e5c92ffb3bf7694ac1e82beb0c33bf3d9..1c9e216bb1fb3edf2f93c18eb211cfed9bf07f20 100644 (file)
@@ -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())
           ) {
index efa2bbc468087ea5b08b0c5dc5d0882f52b09598..1bce20cb85338f3b25f77b96ba9d3143f29c3620 100644 (file)
@@ -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
index 428741fd4cbe673848d01e27662e157b845801dc..67dd29e3db6888b97dcc856bb11da9f9c6bb8515 100644 (file)
@@ -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'] ) ) {
index 244617654d8227082bb91680c9fb11cdbd4cb434..17846862a9a2edb87cf51451190f1535077e6e96 100644 (file)
@@ -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;
index 8b3b58f299957a3226f86f2be8b34b20cd964373..06038bcb2c29ee7c733807c82b7123b2398a45ff 100644 (file)
@@ -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.',
index fb26befb0a015078d120f1a0cc18fa38ebae64d0..92bd3c767b277d1fcb1cc3d0e19a02ad4ed50c21 100644 (file)
@@ -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.',
index 85545ecc5d49dbd250938a44b82774fc6653fb87..2b62a415de449a5766a24b3028965addbc792032 100644 (file)
@@ -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']);
         }
index 25185a91d0e3652102bd7112c8cfd5859865afca..3c4a41721a6ef23ff9111b6de0a5a34f72888a8c 100644 (file)
@@ -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);
             }
           }
index 27cfdf9974c30d551c8a5e119ce06e4009ad5a06..130a509d5bd7566a7d232654a1451b305859602b 100644 (file)
@@ -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>';
     }
index 02430fc25f19b3fd2b83a0c2b041dce82d4c60a1..2bd9c42560969ea89a125b3de1f6712c0f8333db 100644 (file)
@@ -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;
       }
 
index dcf7f94f49ec830ff411441cd0859a2543112223..9c0575e8df2bbd1969d53341ba9c7bd707dae8f9 100644 (file)
@@ -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 {
index b080c59d038dba9f44714b1857aef1e63edbf813..525f4a975fa47f395d73b7cb332e2f11768d7643 100644 (file)
@@ -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,
index cac5f17ab63b937d6f9ca059970fd6164ae56aa0..8224e3a647abb4975bd89a77eda47dee4315af8b 100644 (file)
@@ -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 ";
index f96a6b351fc541ccce306dd771e737999cf2cece..58f2b07e58be2404b46f9ae460473d6b5a8e5416 100644 (file)
@@ -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
index 337da3216729042c626d8b21f4177ea8b04e5a2f..d737bd8198386640c100d68e8ee21ea3871ca089 100644 (file)
@@ -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';
index a958ce11affd1fbbd19e9d45df265c275ef526cb..51b76f4d993512dc39e62831d126f39fe8bdd2d1 100644 (file)
@@ -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') {
index 334a66699bff7d8d55b425db6d0a4620e1caeb85..c0f5162356ff3dbfe7787c2b0255359e5c6ba4ff 100644 (file)
@@ -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');
         }
 
index 6352f8617903644f23b93f099b253ea7bcd42a5c..52cb666737f5568e37b8ea63b127d729abb3b03f 100644 (file)
@@ -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;
     }
   }
index 6496c4e6632f36a6bccd1b211022090ac74a36aa..46f7eb32dbaa3f6aed53180076095ebc9690fd14 100644 (file)
@@ -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']);
             }
index c9b9f16c0aed992121995f03fdeaeb87f11188a6..35747ade9c72cf7df7089533957e25b96aeb99da 100644 (file)
@@ -109,7 +109,7 @@ class CRM_Upgrade_Snapshot_V4p2_Price_BAO_Set extends CRM_Upgrade_Snapshot_V4p2_
     if ($entity == 'contribution') {
       $entityName = 'default_contribution_amount';
     }
-    else if ($entity == 'membership') {
+    elseif ($entity == 'membership') {
       $entityName = 'default_membership_type_amount';
     }
 
index 72def00daa800f4b83bbbdd9102a6834ff35392c..d2aaf38dbc06c700b7cb29272c712890a2801c54 100644 (file)
@@ -77,10 +77,10 @@ class CRM_Utils_Cache {
       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;
       }
 
index 4bf12d17c8c4e1453eb0ad702d4a6301c0730d0d..9de2dd94bf58b18ffd45e45e19e21c1acc9381e9 100644 (file)
@@ -293,7 +293,7 @@ function _civicrm_api3_deprecated_formatted_param($params, &$values, $create = F
         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.");
         }
 
index dabd4f59aa829f9ec0eb71fcee98c6680df647c3..f4f6bde225c75badbef1ebe90c84982d162c1952 100644 (file)
@@ -888,7 +888,7 @@ class CRM_Utils_System_Joomla extends CRM_Utils_System_Base {
       $error = new Exception($content);
       JErrorPage::render($error);
     }
-    else if (class_exists('JError')) {
+    elseif (class_exists('JError')) {
       JError::raiseError('CiviCRM-001', $content);
     }
     else {
index 40053f20f74955003c6c4d0f94f0019025f4b830..3857b3ea5bd5394411d5ed0027df5e16f3e8bfed 100644 (file)
@@ -120,10 +120,10 @@ class Requirements {
     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;
     }