Changeset 1057
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r1056 r1057 15 15 (#192). 16 16 Respect redirect=0 (#104). 17 If an unknown action is supplied to wiki.cgi, redirect to 18 action=display (partial fix for #102) 17 19 18 20 0.60 13 May 2007 -
trunk/wiki.cgi
r1034 r1057 187 187 } elsif ($action eq 'about') { 188 188 $guide->display_about(format => $format); 189 } els e { # Default is to display a node.189 } elsif ($action eq 'display') { 190 190 if ( $format and $format eq "rdf" ) { 191 191 display_node_rdf( node => $node ); … … 221 221 } 222 222 } 223 } 223 } else { 224 # Fallback: redirect to the display page, preserving all vars 225 # except for the action, which we override. 226 # Note: $q->Vars needs munging if we need to support any 227 # multi-valued params 228 my $params = $q->Vars; 229 $params->{'action'} = 'display'; 230 my $redir_target = $script_url . $script_name . '?'; 231 my @args = map { "$_=" . $params->{$_} } keys %{$params}; 232 $redir_target .= join ';', @args; 233 234 print $q->redirect( 235 -uri => $redir_target, 236 -status => 303 237 ); 238 } 239 224 240 }; 225 241
