Changeset 71


Ignore:
Timestamp:
Oct 17, 2006, 5:28:46 PM (13 years ago)
Author:
Dominic Hargreaves
Message:

Fix return link stuff (closes #16)

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

Legend:

Unmodified
Added
Removed
  • trunk/npemap.org.uk/cgi/bad-postcode.fcgi

    r63 r71  
    2323setup_dbh();
    2424
    25 my $returnBaseURL = 'http://www.npemap.org.uk';
     25my $returnBaseURL = '';
    2626
    2727my $cgi;
     
    3131    # If we're given return URL parameters, basic sanity check to stop
    3232    # funny business
    33    
    34     my $returnlink = '<a href="/tiles/map.html?' .int($cgi->param('easting')/1000). ",".int($cgi->param('northing')/1000)  . ',1">Go back</a>';   
    35 
    36     if (defined $cgi->param('returnX') and ($cgi->param('returnX') =~ /\d+/) and
    37         defined $cgi->param('returnY') and ($cgi->param('returnY') =~ /\d+/) ) {
    38         $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html?' . $cgi->param('returnX') . ',' . $cgi->param('returnY') . ',1">Go back to the map</a>';
    39     }
    40 
     33    my $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html">Go back to the map</a>';
    4134
    4235    # In case the database went away, make sure we have a connection
  • trunk/npemap.org.uk/cgi/submit.fcgi

    r70 r71  
    2626
    2727my @fields = qw(easting northing postcode);
    28 my $returnBaseURL = 'http://www.npemap.org.uk';
     28my $returnBaseURL = '';
    2929
    3030my $cgi;
     
    3535    # funny business
    3636   
    37     my $returnlink = '<a href="/tiles/map.html?' .int($cgi->param('easting')/1000). ",".int($cgi->param('northing')/1000)  . ',1">Go back</a>';   
     37    my $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html">Go back to the map</a>';   
    3838
    39     if (defined $cgi->param('returnX') and ($cgi->param('returnX') =~ /\d+/) and
    40         defined $cgi->param('returnY') and ($cgi->param('returnY') =~ /\d+/) ) {
    41         $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html?' . $cgi->param('returnX') . ',' . $cgi->param('returnY') . ',1">Go back to the map</a>';
     39    if (defined $cgi->param('easting') and ($cgi->param('easting') =~ /\d+/) and
     40        defined $cgi->param('northing') and ($cgi->param('northing') =~ /\d+/) ) {
     41        $returnlink = '<a href="' . $returnBaseURL . '/tiles/map.html?' . int($cgi->param('easting')/1000). ",".int($cgi->param('northing')/1000) . ',1">Go back to the map</a>';
    4242    }
    4343
Note: See TracChangeset for help on using the changeset viewer.