Ignore:
Timestamp:
Jun 12, 2004, 4:50:08 PM (17 years ago)
Author:
kake
Message:

Fix redirect bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r391 r392  
    1313use vars qw( $VERSION );
    1414
    15 $VERSION = '0.33_04';
     15$VERSION = '0.33_05';
    1616
    1717=head1 NAME
     
    155155        # See if this is a valid node, if not then just show the page as-is.
    156156        if ( $wiki->node_exists($redirect) ) {
    157             redirect_to_node($redirect);
     157            my $output = $self->redirect_to_node($redirect);
     158            return $output if $return_output;
     159            print $output;
     160            exit 0;
    158161        }
    159162    }
     
    474477}
    475478
     479sub redirect_to_node {
     480    my ($self, $node) = @_;
     481    my $script_url = $self->config->{_}->{script_url};
     482    my $script_name = $self->config->{_}->{script_name};
     483    my $formatter = $self->wiki->formatter;
     484    my $param = $formatter->node_name_to_node_param( $node );
     485    return CGI->redirect( "$script_url$script_name?$param" );
     486}
     487
    476488sub get_cookie {
    477489    my $self = shift;
Note: See TracChangeset for help on using the changeset viewer.