CRM_Core_BAO_Setting::getItem() - Fix calls which use deprecated parameters
authorTim Otten <totten@civicrm.org>
Fri, 21 Aug 2015 02:55:37 +0000 (19:55 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:00 +0000 (15:45 -0700)
CRM/Admin/Form/Setting.php
CRM/Core/CommunityMessages.php
CRM/Core/Payment.php
CRM/Cxn/CiviCxnHttp.php
CRM/Price/BAO/PriceSet.php
CRM/Utils/HttpClient.php
CRM/Utils/VersionCheck.php

index 3e02107b2c77e5ec4a588d4235789c5bf0e6b411..3b62810ad409e46cb948335e34e7525c02ec2a0c 100644 (file)
@@ -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;
index 3e62921d3fe93fd53ff269994e1d569f17b4e958..908bf362f0a572930f6eaaa572a74901f9f17002 100644 (file)
@@ -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;
index 431c0bbc688012d8d775f4bab87412b89d91545f..7e00e8f75580d76c9eb57580f48afa729feffc72 100644 (file)
@@ -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.'),
index 249575847bd66dfe326a015ea43be2ebd0f5e929..c64e79be6060ea9c6b6148ada28a6039506f5711 100644 (file)
@@ -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();
index e28f06e66826488c28e2141b6213843722e3ae49..60a2068abcab950d270d3dcbc0e38f85122b1e7e 100644 (file)
@@ -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');
   }
 
   /**
index f089f7a6d46cc75ac6ab1e77e8e04a62aaffa8b1..73b73cbe98f85297411213cf3058d251d0526e8c 100644 (file)
@@ -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();
index 530d9fd2381e7029bb3413ccda21a5d9a811c42f..1928ec2e3c47884f06fa1935ea019cc0bc6190f3 100644 (file)
@@ -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();