For any two-tier council, postcode.php is making two identical requests to mapit. It is also making its mapit requests invalidly, either by not escaping properly postcodes with a space, or by not using a postcode at all (if from a lat/lon request). It doesn't check the database results for parishes correctly, and doesn't exit when doing a redirect, leading to mapit calls being made which are then made again after the redirect takes place.
This pull request should fix all the above.
Exit if going to do a redirect.
Use a postcode that is set if come via lat/lon, and make sure it's
Don't call mapit again if you've already just done it.
Don't update database given it's not used and needs other data anyway.
Use actual name from database query for test.
Excellent, thanks Matthew. And thanks for being so understanding about me using Mapit. If I could find a free host that supported PostGIS, I'd probably have no need for Mapit! :)
Did you get my email?
Yes. Sorry! Things went a bit mad on Friday. Will respond now :)