<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
class CRM_Utils_Geocode_Yahoo {
/**
- * server to retrieve the lat/long
+ * Server to retrieve the lat/long
*
* @var string
* @static
static protected $_server = 'query.yahooapis.com';
/**
- * uri of service
+ * Uri of service
*
* @var string
* @static
static protected $_uri = '/v1/public/yql';
/**
- * function that takes an address array and gets the latitude / longitude
+ * Function that takes an address array and gets the latitude / longitude
* and postal code for this address. Note that at a later stage, we could
* make this function also clean up the address into a more valid format
*
* @return boolean true if we modified the address, false otherwise
* @static
*/
- static function format(&$values, $stateName = FALSE) {
+ public static function format(&$values, $stateName = FALSE) {
CRM_Utils_System::checkPHPVersion(5, TRUE);
$config = CRM_Core_Config::singleton();
$values['geo_code_1'] = $ret['latitude'];
$values['geo_code_2'] = $ret['longitude'];
- if ($ret['postal']) {
+ if (!empty($ret['postal'])) {
$current_pc = CRM_Utils_Array::value('postal_code', $values);
$skip_postal = FALSE;