From: Sudha Bisht Date: Thu, 28 May 2015 11:42:14 +0000 (+0530) Subject: Fix for map link and display X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=030c6f6b66db77495d421ff9742da706cb390850;p=civicrm-core.git Fix for map link and display --- 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}