From: Niels Heinemann Date: Thu, 18 Feb 2016 11:49:30 +0000 (+0100) Subject: Fix deprecated settings call X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=43959a8a5180bd1481fc2e0026324655b321b893;p=civicrm-core.git Fix deprecated settings call --- diff --git a/CRM/Utils/Recent.php b/CRM/Utils/Recent.php index 69933f7b6b..659b67381f 100644 --- a/CRM/Utils/Recent.php +++ b/CRM/Utils/Recent.php @@ -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); }