Ignore:
Timestamp:
May 27, 2005, 7:51:25 PM (17 years ago)
Author:
Earle Martin
Message:

fix RDF test failures; new redirection message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/OpenGuides.pm

    r633 r634  
    143143    my $wiki = $self->wiki;
    144144    my $config = $self->config;
     145    my $oldid = $args{oldid} || '';
    145146
    146147    my %tt_vars;
     
    171172        # See if this is a valid node, if not then just show the page as-is.
    172173        if ( $wiki->node_exists($redirect) ) {
    173             my $output = $self->redirect_to_node($redirect);
     174            my $output = $self->redirect_to_node($redirect, $id);
    174175            return $output if $return_output;
    175176            print $output;
     
    194195                 node          => $id,
    195196                 language      => $config->default_language,
     197                 oldid         => $oldid,
    196198               );
    197199
     
    850852
    851853sub redirect_to_node {
    852     my ($self, $node) = @_;
     854    my ($self, $node, $redirect) = @_;
    853855    my $script_url = $self->config->script_url;
    854856    my $script_name = $self->config->script_name;
    855857    my $formatter = $self->wiki->formatter;
    856     my $param = $formatter->node_name_to_node_param( $node );
    857     return CGI->redirect( "$script_url$script_name?$param" );
     858    my $id = $formatter->node_name_to_node_param( $node );
     859   
     860    my $oldid;
     861    $oldid = $formatter->node_name_to_node_param( $redirect ) if $redirect;
     862   
     863    my $redir_param ='';
     864    $redir_param = "&oldid=$oldid" if $oldid;
     865   
     866    return CGI->redirect( "$script_url$script_name?id=$id$redir_param" );   
    858867}
    859868
Note: See TracChangeset for help on using the changeset viewer.