From: <Sve...@nt...> - 2005-07-03 14:34:23
|
Author: SvenDowideit Date: 2005-07-03 07:33:41 -0700 (Sun, 03 Jul 2005) New Revision: 4507 Modified: twiki/branches/DEVELOP/bin/configure Log: Item44: use $query->path_info() for for action so we are not hardcoding the script name - and it gets the working scriptSuffix too Modified: twiki/branches/DEVELOP/bin/configure =================================================================== --- twiki/branches/DEVELOP/bin/configure 2005-07-03 14:08:15 UTC (rev 4506) +++ twiki/branches/DEVELOP/bin/configure 2005-07-03 14:33:41 UTC (rev 4507) @@ -586,6 +586,11 @@ sub _checkScriptSuffix { # SMELL: should check to see what the extension on _this_ script # is, and generate a helpful message + if ( defined $TWiki::cfg{ScriptSuffix} ) { + if ( ! $query->path_info() =~ /$TWiki::cfg{ScriptSuffix}$/ ) { + return ERROR('this script ('.$query->pather_info().') called with different ScriptSuffix setting'.$TWiki::cfg{ScriptSuffix}); + } + } return ''; } @@ -833,7 +838,7 @@ my $param; unless( defined( $pass )) { - print CGI::start_form({ action=>'configure',method=>"post" }); + print CGI::start_form({ action=>$query->path_info(),method=>"post" }); # Pass all URL params through foreach $param ( $query->param ) { print CGI::hidden( $param, $query->param( $param )),"\n"; @@ -1568,7 +1573,7 @@ HERE if( $update_enabled ) { - print CGI::start_form({ action=>'configure',method=>"post" }); + print CGI::start_form({ action=>$query->path_info(),method=>"post" }); # use time to make sure we never allow cacheing print CGI::hidden(-name=>'action',-value=>'update'); print CGI::hidden(-name=>'time',-value=>time()); |