From 395d8dc68c867b32c41f9486db12aaea685e9bfc Mon Sep 17 00:00:00 2001 From: Eileen Date: Wed, 1 Jan 2014 23:40:35 +1300 Subject: [PATCH] Fix case on Class names (actually they are case insensitive so this is just a tidy up --- CRM/Admin/Form/PreferencesDate.php | 2 +- CRM/Campaign/BAO/Query.php | 4 ++-- CRM/Case/Form/Activity/OpenCase.php | 2 +- CRM/Contact/Form/Edit/Address.php | 2 +- CRM/Contact/Form/Merge.php | 8 ++++---- CRM/Core/DAO.php | 8 ++++---- CRM/Upgrade/Incremental/php/FourTwo.php | 2 +- CRM/Utils/Date.php | 2 +- api/v3/Domain.php | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CRM/Admin/Form/PreferencesDate.php b/CRM/Admin/Form/PreferencesDate.php index 42dca38894..f6621d2e23 100644 --- a/CRM/Admin/Form/PreferencesDate.php +++ b/CRM/Admin/Form/PreferencesDate.php @@ -68,7 +68,7 @@ class CRM_Admin_Form_PreferencesDate extends CRM_Admin_Form { $this->add('text', 'start', ts('Start Offset'), $attributes['start'], TRUE); $this->add('text', 'end', ts('End Offset'), $attributes['end'], TRUE); - $formatType = CRM_Core_Dao::getFieldValue('CRM_Core_DAO_PreferencesDate', $this->_id, 'name'); + $formatType = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_PreferencesDate', $this->_id, 'name'); if ($formatType == 'creditCard') { $this->add('text', 'date_format', ts('Format'), $attributes['date_format'], TRUE); diff --git a/CRM/Campaign/BAO/Query.php b/CRM/Campaign/BAO/Query.php index 63ec197ffa..bfbb6980e2 100755 --- a/CRM/Campaign/BAO/Query.php +++ b/CRM/Campaign/BAO/Query.php @@ -136,7 +136,7 @@ class CRM_Campaign_BAO_Query { $grouping = NULL; foreach (array_keys($query->_params) as $id) { - if ($query->_mode == CRM_Contact_BAO_QUERY::MODE_CONTACTS) { + if ($query->_mode == CRM_Contact_BAO_Query::MODE_CONTACTS) { $query->_useDistinct = TRUE; } @@ -349,7 +349,7 @@ civicrm_activity_assignment.record_type_id = $assigneeID ) "; $userId = $form->_interviewerId; } if (!$userId) { - $session = CRM_core_Session::singleton(); + $session = CRM_Core_Session::singleton(); $userId = $session->get('userID'); } if ($userId) { diff --git a/CRM/Case/Form/Activity/OpenCase.php b/CRM/Case/Form/Activity/OpenCase.php index e1cca64289..88572500c7 100644 --- a/CRM/Case/Form/Activity/OpenCase.php +++ b/CRM/Case/Form/Activity/OpenCase.php @@ -207,7 +207,7 @@ class CRM_Case_Form_Activity_OpenCase { } // set the contact, when contact is selected - if (isset($params['contact_select_id']) && CRM_utils_Array::value(1, $params['contact_select_id'])) { + if (isset($params['contact_select_id']) && CRM_Utils_Array::value(1, $params['contact_select_id'])) { $params['contact_id'] = $params['contact_select_id'][1]; $form->_currentlyViewedContactId = $params['contact_id']; } diff --git a/CRM/Contact/Form/Edit/Address.php b/CRM/Contact/Form/Edit/Address.php index e8a944f589..6ec4d9143f 100644 --- a/CRM/Contact/Form/Edit/Address.php +++ b/CRM/Contact/Form/Edit/Address.php @@ -497,7 +497,7 @@ class CRM_Contact_Form_Edit_Address { static function setDefaultValues( &$defaults, &$form ) { $addressValues = array(); if (isset($defaults['address']) && is_array($defaults['address']) && - !CRM_Utils_system::isNull($defaults['address']) + !CRM_Utils_System::isNull($defaults['address']) ) { // start of contact shared adddress defaults diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php index 18662a2dc5..d4b897a2a8 100644 --- a/CRM/Contact/Form/Merge.php +++ b/CRM/Contact/Form/Merge.php @@ -110,7 +110,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $this->assign('mainUfName', $mainUser ? $mainUser->name : NULL); } - $flipUrl = CRM_Utils_system::url('civicrm/contact/merge', + $flipUrl = CRM_Utils_System::url('civicrm/contact/merge', "reset=1&action=update&cid={$oid}&oid={$cid}&rgid={$rgid}&gid={$gid}" ); if (!$flip) { @@ -132,7 +132,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $urlParam .= "&gid={$gid}"; } - $this->$position = CRM_Utils_system::url('civicrm/contact/merge', $urlParam); + $this->$position = CRM_Utils_System::url('civicrm/contact/merge', $urlParam); $this->assign($position, $this->$position); } } @@ -166,7 +166,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { if ($gid) { $urlParam .= "&gid={$gid}"; } - $session->pushUserContext(CRM_Utils_system::url('civicrm/contact/dedupefind', $urlParam)); + $session->pushUserContext(CRM_Utils_System::url('civicrm/contact/dedupefind', $urlParam)); } // ensure that oid is not the current user, if so refuse to do the merge @@ -365,7 +365,7 @@ class CRM_Contact_Form_Merge extends CRM_Core_Form { $urlParam .= "&gid={$this->_gid}"; } - $url = CRM_Utils_system::url('civicrm/contact/merge', $urlParam); + $url = CRM_Utils_System::url('civicrm/contact/merge', $urlParam); } } diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index b3517d59f9..25c72ac8c6 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1797,7 +1797,7 @@ EOS; public function getOptionLabels() { $fields = $this->fields(); if ($fields === NULL) { - throw new exception ('Cannot call getOptionLabels on CRM_Core_DAO'); + throw new Exception ('Cannot call getOptionLabels on CRM_Core_DAO'); } foreach ($fields as $field) { $name = CRM_Utils_Array::value('name', $field); @@ -1826,7 +1826,7 @@ EOS; ); // Validation: enforce uniformity of this param if ($context !== NULL && !isset($contexts[$context])) { - throw new exception("'$context' is not a valid context for buildOptions."); + throw new Exception("'$context' is not a valid context for buildOptions."); } return $contexts; } @@ -1876,7 +1876,7 @@ EOS; case 'BETWEEN': case 'NOT BETWEEN': if (empty($criteria[0]) || empty($criteria[1])) { - throw new exception("invalid criteria for $operator"); + throw new Exception("invalid criteria for $operator"); } if(!$returnSanitisedArray) { return (sprintf('%s ' . $operator . ' "%s" AND "%s"', $fieldName, CRM_Core_DAO::escapeString($criteria[0]), CRM_Core_DAO::escapeString($criteria[1]))); @@ -1890,7 +1890,7 @@ EOS; case 'IN': case 'NOT IN': if (empty($criteria)) { - throw new exception("invalid criteria for $operator"); + throw new Exception("invalid criteria for $operator"); } $escapedCriteria = array_map(array( 'CRM_Core_DAO', diff --git a/CRM/Upgrade/Incremental/php/FourTwo.php b/CRM/Upgrade/Incremental/php/FourTwo.php index 22eb06def5..cb088db0b9 100644 --- a/CRM/Upgrade/Incremental/php/FourTwo.php +++ b/CRM/Upgrade/Incremental/php/FourTwo.php @@ -148,7 +148,7 @@ INNER JOIN civicrm_price_set cps ON cps.id = cpf.price_set_id AND cps.name <>'de $config = CRM_Core_Config::singleton(); if (!empty($config->extensionsDir)) { $postUpgradeMessage .= '
' . ts('Please configure the Extension Resource URL.', array( - 1 => CRM_Utils_system::url('civicrm/admin/setting/url', 'reset=1') + 1 => CRM_Utils_System::url('civicrm/admin/setting/url', 'reset=1') )); } } diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index 7439beb85c..69df6f6ec4 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -1533,7 +1533,7 @@ class CRM_Utils_Date { static function getDateFormat($formatType = NULL) { $format = NULL; if ($formatType) { - $format = CRM_Core_Dao::getFieldValue('CRM_Core_DAO_PreferencesDate', + $format = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_PreferencesDate', $formatType, 'date_format', 'name' ); } diff --git a/api/v3/Domain.php b/api/v3/Domain.php index 0044289bec..31314b2602 100644 --- a/api/v3/Domain.php +++ b/api/v3/Domain.php @@ -44,7 +44,7 @@ */ function civicrm_api3_domain_get($params) { - $params['version'] = CRM_Utils_array::value('domain_version', $params); + $params['version'] = CRM_Utils_Array::value('domain_version', $params); unset($params['version']); $bao = new CRM_Core_BAO_Domain(); -- 2.25.1