Changeset 773 for trunk/wiki.cgi

Show
Ignore:
Timestamp:
04/20/06 15:13:20 (3 years ago)
Author:
dom
Message:

Fix RSS redirection (fixes #54)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/wiki.cgi

    r769 r773  
    1 #!/usr/local/bin/perl 
     1#!/usr/bin/perl 
    22 
    33use strict; 
     
    115115        } 
    116116    } elsif ($action eq 'rss') { 
    117         print $q->redirect( $script_url . '?action=rc;format=rss' ); 
     117        my $redir_target = $script_url . $script_name . '?action=rc;format=rss'; 
     118        my %args = map { $_ => ( $q->param($_) || "" ) } 
     119            qw( feed items days ignore_minor_edits username 
     120                category locale ); 
     121        foreach my $arg (sort keys %args) { 
     122            if ($args{$arg} ne "") { 
     123                $redir_target .= ";$arg=$args{$arg}"; 
     124            } 
     125        } 
     126        print $q->redirect( $redir_target ); 
    118127    } else { # Default is to display a node. 
    119128        if ( $format and $format eq "rdf" ) {