From: Tim Otten Date: Fri, 21 Aug 2015 02:55:37 +0000 (-0700) Subject: CRM_Core_BAO_Setting::getItem() - Fix calls which use deprecated parameters X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d356cdebdaa45a3479eda021de7b17260f748fae;p=civicrm-core.git CRM_Core_BAO_Setting::getItem() - Fix calls which use deprecated parameters --- diff --git a/CRM/Admin/Form/Setting.php b/CRM/Admin/Form/Setting.php index 3e02107b2c..3b62810ad4 100644 --- a/CRM/Admin/Form/Setting.php +++ b/CRM/Admin/Form/Setting.php @@ -101,8 +101,8 @@ class CRM_Admin_Form_Setting extends CRM_Core_Form { ); } - $this->_defaults['enableSSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL', NULL, 0); - $this->_defaults['verifySSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, 1); + $this->_defaults['enableSSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'enableSSL'); + $this->_defaults['verifySSL'] = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'); } return $this->_defaults; diff --git a/CRM/Core/CommunityMessages.php b/CRM/Core/CommunityMessages.php index 3e62921d3f..908bf362f0 100644 --- a/CRM/Core/CommunityMessages.php +++ b/CRM/Core/CommunityMessages.php @@ -77,7 +77,7 @@ class CRM_Core_CommunityMessages { $this->cache = $cache; $this->client = $client; if ($messagesUrl === NULL) { - $this->messagesUrl = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'communityMessagesUrl', NULL, '*default*'); + $this->messagesUrl = Civi::settings()->get('communityMessagesUrl'); } else { $this->messagesUrl = $messagesUrl; diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 431c0bbc68..7e00e8f755 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -451,11 +451,7 @@ abstract class CRM_Core_Payment { 'maxlength' => 10, 'autocomplete' => 'off', ), - 'is_required' => CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, - 'cvv_backoffice_required', - NULL, - 1 - ), + 'is_required' => Civi::settings()->get('cvv_backoffice_required'), 'rules' => array( array( 'rule_message' => ts('Please enter a valid value for your card security code. This is usually the last 3-4 digits on the card\'s signature panel.'), diff --git a/CRM/Cxn/CiviCxnHttp.php b/CRM/Cxn/CiviCxnHttp.php index 249575847b..c64e79be60 100644 --- a/CRM/Cxn/CiviCxnHttp.php +++ b/CRM/Cxn/CiviCxnHttp.php @@ -89,7 +89,7 @@ class CRM_Cxn_CiviCxnHttp extends \Civi\Cxn\Rpc\Http\PhpHttp { $result = parent::createStreamOpts($verb, $url, $blob, $headers); $caConfig = CA_Config_Stream::probe(array( - 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE), + 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'), )); if ($caConfig->isEnableSSL()) { $result['ssl'] = $caConfig->toStreamOptions(); diff --git a/CRM/Price/BAO/PriceSet.php b/CRM/Price/BAO/PriceSet.php index e28f06e668..60a2068abc 100644 --- a/CRM/Price/BAO/PriceSet.php +++ b/CRM/Price/BAO/PriceSet.php @@ -1360,10 +1360,7 @@ GROUP BY mt.member_of_contact_id"; * @return object */ public static function eventPriceSetDomainID() { - return CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MULTISITE_PREFERENCES_NAME, - 'event_price_set_domain_id', - NULL, FALSE - ); + return Civi::settings()->get('event_price_set_domain_id'); } /** diff --git a/CRM/Utils/HttpClient.php b/CRM/Utils/HttpClient.php index f089f7a6d4..73b73cbe98 100644 --- a/CRM/Utils/HttpClient.php +++ b/CRM/Utils/HttpClient.php @@ -197,7 +197,7 @@ class CRM_Utils_HttpClient { */ protected function createCurl($remoteFile) { $caConfig = CA_Config_Curl::probe(array( - 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE), + 'verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL'), )); $ch = curl_init(); diff --git a/CRM/Utils/VersionCheck.php b/CRM/Utils/VersionCheck.php index 530d9fd238..1928ec2e3c 100644 --- a/CRM/Utils/VersionCheck.php +++ b/CRM/Utils/VersionCheck.php @@ -291,7 +291,7 @@ class CRM_Utils_VersionCheck { 'ufv' => $config->userFrameworkVersion, 'PHP' => phpversion(), 'MySQL' => CRM_CORE_DAO::singleValueQuery('SELECT VERSION()'), - 'communityMessagesUrl' => CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'communityMessagesUrl', NULL, '*default*'), + 'communityMessagesUrl' => Civi::settings()->get('communityMessagesUrl'), ); $this->getPayProcStats(); $this->getEntityStats();