From 030c6f6b66db77495d421ff9742da706cb390850 Mon Sep 17 00:00:00 2001 From: Sudha Bisht Date: Thu, 28 May 2015 17:12:14 +0530 Subject: [PATCH] Fix for map link and display --- CRM/Contact/Selector.php | 3 ++- CRM/Contact/Selector/Custom.php | 3 ++- templates/CRM/Contact/Form/Task/Map/Google.tpl | 8 +------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index d03e948fca..d8920ae59f 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -261,7 +261,8 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se ); $config = CRM_Core_Config::singleton(); - if ($config->mapAPIKey && $config->mapProvider) { + //CRM-16552: mapAPIKey is not mandatory as google no longer requires an API Key + if ($config->mapProvider && ($config->mapAPIKey || $config->mapProvider == 'Google')) { self::$_links[CRM_Core_Action::MAP] = array( 'name' => ts('Map'), 'url' => 'civicrm/contact/map', diff --git a/CRM/Contact/Selector/Custom.php b/CRM/Contact/Selector/Custom.php index ad66bf73cd..ba671244a9 100644 --- a/CRM/Contact/Selector/Custom.php +++ b/CRM/Contact/Selector/Custom.php @@ -183,7 +183,8 @@ class CRM_Contact_Selector_Custom extends CRM_Contact_Selector { ); $config = CRM_Core_Config::singleton(); - if ($config->mapAPIKey && $config->mapProvider) { + //CRM-16552: mapAPIKey is not mandatory as google no longer requires an API Key + if ($config->mapProvider && ($config->mapAPIKey || $config->mapProvider == 'Google')) { self::$_links[CRM_Core_Action::MAP] = array( 'name' => ts('Map'), 'url' => 'civicrm/contact/map', diff --git a/templates/CRM/Contact/Form/Task/Map/Google.tpl b/templates/CRM/Contact/Form/Task/Map/Google.tpl index c7b5389c19..0605982b99 100644 --- a/templates/CRM/Contact/Form/Task/Map/Google.tpl +++ b/templates/CRM/Contact/Form/Task/Map/Google.tpl @@ -32,7 +32,7 @@ {/if} {assign var=defaultZoom value=16} {literal} - + {/literal}
-- 2.25.1