Changeset 232

Show
Ignore:
Timestamp:
09/03/03 08:38:23 (5 years ago)
Author:
kake
Message:

Strip whitespace from OS co-ords before storing in database.

Location:
trunk
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r231 r232  
    110.24     
    22        Fix to recent changes so minor changes don't mask major ones. 
    3         Fix supersearch.cgi to use a template instead of CGI.pm to avoid 
     3        Fixed supersearch.cgi to use a template instead of CGI.pm to avoid 
    44          weird errors, also turned it into a module and added tests. 
     5        Strip whitespace from OS co-ords before storing in database. 
    56 
    670.23    4 August 2003 
  • trunk/MANIFEST

    r231 r232  
    5959t/51_diff.t 
    6060t/61_bug_textareas.t 
     61t/62_bug_os_coords.t 
    6162t/templates/15_test.tt 
    6263wiki.cgi 
  • trunk/lib/OpenGuides/Template.pm

    r230 r232  
    33use strict; 
    44use vars qw( $VERSION ); 
    5 $VERSION = '0.11'; 
     5$VERSION = '0.12'; 
    66 
    77use Carp qw( croak ); 
     
    259259        my $os_x = $q->param("os_x"); 
    260260        my $os_y = $q->param("os_y"); 
     261        # Trim whitespace - trailing whitespace buggers up the integerification 
     262        # by postgres and it's an easy mistake to make when typing into a form. 
     263        $os_x =~ s/\s+//; 
     264        $os_y =~ s/\s+//; 
    261265        # Work out latitude and longitude for the preview display. 
    262266        if ($os_x and $os_y) {