CRM_Utils_Geocode - Read settings instead of config
authorTim Otten <totten@civicrm.org>
Sun, 23 Aug 2015 15:58:01 +0000 (08:58 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:01 +0000 (15:45 -0700)
CRM/Utils/Geocode.php

index 789a98dd76b85de557f718a59dc327f26f1bd79e..cf26e222ece40b524f64c62148a4d04ab2b6e55d 100644 (file)
@@ -35,12 +35,12 @@ class CRM_Utils_Geocode {
    *   Class name, or empty.
    */
   public static function getProviderClass() {
-    $config = CRM_Core_Config::singleton();
-    if ($config->geoProvider) {
-      return 'CRM_Utils_Geocode_' . $config->geoProvider;
+    $settings = Civi::settings();
+    if ($settings->get('geoProvider')) {
+      return 'CRM_Utils_Geocode_' . $settings->get('geoProvider');
     }
-    elseif ($config->mapProvider) {
-      return 'CRM_Utils_Geocode_' . $config->mapProvider;
+    elseif ($settings->get('mapProvider')) {
+      return 'CRM_Utils_Geocode_' . $settings->get('mapProvider');
     }
     else {
       return '';