Changeset 564 for trunk


Ignore:
Timestamp:
Jul 24, 2007, 9:17:01 PM (12 years ago)
Author:
Nick Burch
Message:

Handle negative northings

Location:
trunk/npemap.org.uk/cgi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/get-postcodes.fcgi

    r544 r564  
    7171
    7272    # Are the Northings in a valid range?
     73        # (Channel islands stop at -87,000)
    7374    foreach (qw(minnorthing maxnorthing)) {
    7475        if (($cgi->param($_) > $grid_max{'northing'}->{$grid}) or
    75             ($cgi->param($_) < 0)) {
    76             print_err("Parameter '$_' must be an integer between 0 and ".($grid_max{'northing'}->{$grid}/1000).",000");
     76            ($cgi->param($_) < 87000)) {
     77            print_err("Parameter '$_' must be an integer between -87,000 and ".($grid_max{'northing'}->{$grid}/1000).",000");
    7778            next REQUEST;
    7879        }
  • trunk/npemap.org.uk/cgi/submit.fcgi

    r545 r564  
    6767
    6868    # Is the Northing in a valid range?
     69        # (Channel islands stop at -87,000)
    6970    if (($cgi->param('northing') > 1300000) or
    70         ($cgi->param('northing') < 0)) {
    71         print_html_err("Parameter 'northing' must be an integer between 0 and 1,300,000", $returnlink);
     71                ($cgi->param($_) < 87000)) {
     72                print_err("Parameter '$_' must be an integer between -87,000 and ".($grid_max{'northing'}->{$grid}/1000).",000");
    7273        next REQUEST;
    7374    } else {
Note: See TracChangeset for help on using the changeset viewer.