Ignore:
Timestamp:
Nov 16, 2004, 1:50:24 PM (17 years ago)
Author:
kake
Message:

Fix bugs with latlong representation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r546 r547  
    527527    my $node = $args{id};
    528528    my $q = $args{cgi_obj};
     529    my $return_output = $args{return_output};
    529530    my $wiki = $self->wiki;
    530531    my $config = $self->config;
     
    541542
    542543    $metadata{opening_hours_text} = $q->param("hours_text") || "";
     544
     545    # Pick out the unmunged versions of lat/long if they're set.
     546    # (If they're not, it means they weren't munged in the first place.)
     547    $metadata{latitude} = delete $metadata{latitude_unmunged}
     548        if $metadata{latitude_unmunged};
     549    $metadata{longitude} = delete $metadata{longitude_unmunged}
     550        if $metadata{longitude_unmunged};
    543551
    544552    # Check to make sure all the indexable nodes are created
     
    577585
    578586    if ($written) {
    579         print $self->redirect_to_node($node);
     587        my $output = $self->redirect_to_node($node);
     588        return $output if $return_output;
     589        print $output;
    580590    } else {
    581591        my %node_data = $wiki->retrieve_node($node);
Note: See TracChangeset for help on using the changeset viewer.