Ignore:
Timestamp:
Dec 14, 2004, 5:34:02 PM (17 years ago)
Author:
kake
Message:

Fixed distance search paging bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides/SuperSearch.pm

    r585 r586  
    154154         && defined $self->{x} && defined $self->{y} ) {
    155155        $doing_search = 1;
    156         $tt_vars{dist} = $self->{distance_in_metres};
    157         foreach my $param ( qw( os_x os_y osie_x osie_y latitude longitude )) {
    158             $tt_vars{$param} = $self->{$param};
    159         }
     156        # Make sure to pass the criteria to the template.                   
     157        $tt_vars{dist} = $self->{distance_in_metres};
     158        if ( $self->config->{_}{geo_handler} eq 1 ) {
     159            $tt_vars{coord_field_1_value} = $self->{os_x};
     160            $tt_vars{coord_field_2_value} = $self->{os_y};
     161        } elsif ( $self->config->{_}{geo_handler} eq 2 ) {
     162            $tt_vars{coord_field_1_value} = $self->{osie_x};
     163            $tt_vars{coord_field_2_value} = $self->{osie_y};
     164        } elsif ( $self->config->{_}{geo_handler} eq 3 ) {
     165            $tt_vars{coord_field_1_value} = $self->{latitude};
     166            $tt_vars{coord_field_2_value} = $self->{longitude};
     167        }                                               
    160168        $self->run_distance_search;
    161169    }
Note: See TracChangeset for help on using the changeset viewer.