From 6b0903e8f2e598c85a0f32a4d33ed323fccd3d7e Mon Sep 17 00:00:00 2001 From: memespring Date: Mon, 9 Apr 2007 16:40:25 +0000 Subject: [PATCH] api fix 1 --- data/%%AD^AD7^AD71B708%%rss.tpl.php | 2 +- data/%%F7^F7F^F7F34188%%header.tpl.php | 2 +- docs/api.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/data/%%AD^AD7^AD71B708%%rss.tpl.php b/data/%%AD^AD7^AD71B708%%rss.tpl.php index 64e3b8b..cbc4b85 100644 --- a/data/%%AD^AD7^AD71B708%%rss.tpl.php +++ b/data/%%AD^AD7^AD71B708%%rss.tpl.php @@ -1,4 +1,4 @@ - version="1.0" encoding="UTF-8"'; ?> diff --git a/data/%%F7^F7F^F7F34188%%header.tpl.php b/data/%%F7^F7F^F7F34188%%header.tpl.php index b6bd88e..fb3edab 100644 --- a/data/%%F7^F7F^F7F34188%%header.tpl.php +++ b/data/%%F7^F7F^F7F34188%%header.tpl.php @@ -1,4 +1,4 @@ - diff --git a/docs/api.php b/docs/api.php index 0205224..76b10fa 100644 --- a/docs/api.php +++ b/docs/api.php @@ -33,14 +33,17 @@ class api { switch ($call) { case "postcode": - if(!isset($_GET['postcode']) || !is_postcode($_GET['area_size'])){ + + if(!isset($_GET['area_size']) || !is_postcode($_GET['postcode'])){ array_push($this->warnings, "No valid postcode specified"); } if(!isset($_GET['area_size'])){ array_push($this->warnings, "Area size specified"); } + //all good, get the data if(sizeof($this->warnings) == 0){ + $xy = postcode_to_location($_GET['postcode']); $easting = $xy[0]; $northing = $xy[1];