Author: kake
Date: 2012-05-20 16:31:34 +0100 (Sun, 20 May 2012)
New Revision: 1405
Modified:
trunk/Changes
trunk/wiki.cgi
Log:
Fixed bug with POST redirection introduced in [1315].
Modified: trunk/Changes
===================================================================
--- trunk/Changes 2012-05-13 09:26:50 UTC (rev 1404)
+++ trunk/Changes 2012-05-20 15:31:34 UTC (rev 1405)
@@ -3,6 +3,12 @@
More detailed changelogs can be found at
<http://dev.openguides.org/log/trunk>.
+0.68 ?
+ Made sure that maps are centred and zoomed properly even when they only
+ contain one point.
+ Made preferences default to never expiring.
+ Fixed POST bug introduced with whitespace redirection in version 0.66.
+
0.67 07 May 2012
Switched from the Google Maps API to the Leaflet mapping library.
To make this work, set use_leaflet = 1 in your wiki.conf, and ensure
Modified: trunk/wiki.cgi
===================================================================
--- trunk/wiki.cgi 2012-05-13 09:26:50 UTC (rev 1404)
+++ trunk/wiki.cgi 2012-05-20 15:31:34 UTC (rev 1405)
@@ -32,13 +32,18 @@
$formatter = $wiki->formatter;
$q = CGI->new;
- # See if we need to redirect due to spaces in URL.
- my $redirect = OpenGuides::CGI->check_spaces_redirect(
+ # See if we need to redirect due to spaces in URL. Don't do this for
+ # POST requests though - it leads to all the data being stuffed into the
+ # URL, which breaks things if there's a lot of data.
+ my $request_method = $q->request_method() || "";
+ unless ( $request_method eq "POST" ) {
+ my $redirect = OpenGuides::CGI->check_spaces_redirect(
cgi_obj => $q, wiki => $wiki );
- if ( $redirect ) {
- print $q->redirect( -uri => $redirect, -status => 303 );
- exit 0;
+ if ( $redirect ) {
+ print $q->redirect( -uri => $redirect, -status => 303 );
+ exit 0;
+ }
}
# No redirect - carry on.
@@ -47,7 +52,6 @@
# If we did a post, then CGI->param probably hasn't fully de-escaped,
# in the same way as a get would've done
- my $request_method = $q->request_method() || '';
if($request_method eq 'POST') {
$node = uri_unescape($node);
}
Show replies by date