Skip to content

Commit

Permalink
Use a postcode that is set if come via lat/lon, and make sure it's
Browse files Browse the repository at this point in the history
encoded.
  • Loading branch information
dracos committed Jun 21, 2012
1 parent 6fbdd4f commit 9a3c9a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions postcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

if (strlen($row['electoraldistrict']) == 0) {

$mapit = json_decode(file_get_contents("http://mapit.mysociety.org/postcode/". urlencode($postcode) .".json"));
$mapit = json_decode(file_get_contents("http://mapit.mysociety.org/postcode/". urlencode($updatepostcode) .".json"));

foreach ($mapit->areas as $area) {
if ($area->type_name == "County council ward") {
Expand Down Expand Up @@ -126,7 +126,7 @@

if (strlen($row['parish'] == 0)) {

$mapit = json_decode(file_get_contents("http://mapit.mysociety.org/postcode/". $postcode .".json"));
$mapit = json_decode(file_get_contents("http://mapit.mysociety.org/postcode/". urlencode($updatepostcode) .".json"));

foreach ($mapit->areas as $area) {
if ($area->type_name == "Civil Parish") {
Expand Down

0 comments on commit 9a3c9a2

Please sign in to comment.