From 75474b0eb2189d09e2605b2e8c26689df9bcfff7 Mon Sep 17 00:00:00 2001 From: memespring Date: Mon, 9 Apr 2007 16:40:25 +0000 Subject: [PATCH] api fix 1 --- trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php | 2 +- trunk/data/%%F7^F7F^F7F34188%%header.tpl.php | 2 +- trunk/docs/api.php | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php b/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php index 64e3b8b..cbc4b85 100644 --- a/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php +++ b/trunk/data/%%AD^AD7^AD71B708%%rss.tpl.php @@ -1,4 +1,4 @@ - version="1.0" encoding="UTF-8"'; ?> diff --git a/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php b/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php index b6bd88e..fb3edab 100644 --- a/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php +++ b/trunk/data/%%F7^F7F^F7F34188%%header.tpl.php @@ -1,4 +1,4 @@ - diff --git a/trunk/docs/api.php b/trunk/docs/api.php index 0205224..76b10fa 100644 --- a/trunk/docs/api.php +++ b/trunk/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];