Fix deprecated settings call
authorNiels Heinemann <heinemann@kompetenzz.de>
Thu, 18 Feb 2016 11:49:30 +0000 (12:49 +0100)
committerNiels Heinemann <heinemann@kompetenzz.de>
Fri, 20 May 2016 09:42:27 +0000 (11:42 +0200)
CRM/Utils/Recent.php

index 69933f7b6b12b5d1e7fb0f311fd6643732fbd2e1..659b67381f0198367eb978b16242418999d734f6 100644 (file)
@@ -59,7 +59,7 @@ class CRM_Utils_Recent {
    * Initialize this class and set the static variables.
    */
   public static function initialize() {
-    $maxItemsSetting = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'recentItemsMaxCount');
+    $maxItemsSetting = Civi::settings()->get('recentItemsMaxCount');
     if (isset($maxItemsSetting) && $maxItemsSetting > 0 && $maxItemsSetting < 100) {
       self::$_maxItems = $maxItemsSetting;
     }
@@ -220,7 +220,7 @@ class CRM_Utils_Recent {
     $allowed = TRUE;
 
     // Use core setting recentItemsProviders if configured
-    $providersPermitted = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'recentItemsProviders');
+    $providersPermitted = Civi::settings()->get('recentItemsProviders');
     if ($providersPermitted) {
       $allowed = in_array($providerName, $providersPermitted);
     }