Send Geo Url Header only if use_geo_positions is set. Bug 242. Patch from 2fargon.

git-svn-id: http://svn.automattic.com/wordpress/trunk@1584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2004-09-03 04:29:11 +00:00
parent 33d4b98278
commit c7c191ed19
1 changed files with 22 additions and 20 deletions

View File

@ -834,6 +834,7 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php');
function doGeoUrlHeader($post_list = '') {
global $posts;
if (get_settings('use_geo_positions')) {
if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) {
// there's only one result see if it has a geo code
$row = $posts[0];
@ -855,6 +856,7 @@ function doGeoUrlHeader($post_list = '') {
}
}
}
}
function getRemoteFile($host,$path) {
$fp = fsockopen($host, 80, $errno, $errstr);