copyright and version fixes
[civicrm-core.git] / CRM / Utils / Geocode / Google.php
index aba9acc525102f5a659fec8d20a89e8d7f77feaa..d9ceaed0124b5a6c1090533fbe7ac416490e881e 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
   +--------------------------------------------------------------------+
-  | CiviCRM version 4.4                                                |
+  | CiviCRM version 4.5                                                |
   +--------------------------------------------------------------------+
-  | Copyright CiviCRM LLC (c) 2004-2013                                |
+  | Copyright CiviCRM LLC (c) 2004-2014                                |
   +--------------------------------------------------------------------+
   | This file is a part of CiviCRM.                                    |
   |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -66,7 +66,7 @@ class CRM_Utils_Geocode_Google {
    */
   static function format(&$values, $stateName = FALSE) {
     // we need a valid country, else we ignore
-    if (!CRM_Utils_Array::value('country', $values)) {
+    if (empty($values['country'])) {
       return FALSE;
     }
 
@@ -74,7 +74,7 @@ class CRM_Utils_Geocode_Google {
 
     $add = '';
 
-    if (CRM_Utils_Array::value('street_address', $values)) {
+    if (!empty($values['street_address'])) {
       $add = urlencode(str_replace('', '+', $values['street_address']));
       $add .= ',+';
     }
@@ -85,8 +85,8 @@ class CRM_Utils_Geocode_Google {
       $add .= ',+';
     }
 
-    if (CRM_Utils_Array::value('state_province', $values)) {
-      if (CRM_Utils_Array::value('state_province_id', $values)) {
+    if (!empty($values['state_province'])) {
+      if (!empty($values['state_province_id'])) {
         $stateProvince = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_StateProvince', $values['state_province_id']);
       }
       else {
@@ -109,12 +109,12 @@ class CRM_Utils_Geocode_Google {
       }
     }
 
-    if (CRM_Utils_Array::value('postal_code', $values)) {
+    if (!empty($values['postal_code'])) {
       $add .= '+' . urlencode(str_replace('', '+', $values['postal_code']));
       $add .= ',+';
     }
 
-    if (CRM_Utils_Array::value('country', $values)) {
+    if (!empty($values['country'])) {
       $add .= '+' . urlencode(str_replace('', '+', $values['country']));
     }