* (bug 6946) Fix unexpected behavior change with GET hits to Special:Export
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 15 Aug 2006 15:50:21 +0000 (15:50 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 15 Aug 2006 15:50:21 +0000 (15:50 +0000)
RELEASE-NOTES
includes/SpecialExport.php

index 2c86234..be0f65a 100644 (file)
@@ -127,6 +127,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 6971) Fix regression in Special:Export history view
 * Revamped Special:Imagelist
 * (bug 7000) updated MessagesPl.php
+* (bug 6946) Fix unexpected behavior change with GET hits to Special:Export
 
 
 == Languages updated ==
index 39e1d26..e3ba023 100644 (file)
@@ -39,7 +39,7 @@ function wfSpecialExport( $page = '' ) {
                'offset' => false,
                'limit' => $maxLimit,
        );
-       if( $wgRequest->getVal( 'action' ) == 'submit') {
+       if( $wgRequest->wasPosted() ) {
                $page = $wgRequest->getText( 'pages' );
                $curonly = $wgRequest->getCheck( 'curonly' );
                $rawOffset = $wgRequest->getVal( 'offset' );
@@ -69,6 +69,15 @@ function wfSpecialExport( $page = '' ) {
                                $history['dir'] = 'desc';
                        }
                }
+       } else {
+               // Default to current-only for GET requests
+               $page = $wgRequest->getText( 'pages' );
+               $historyCheck = $wgRequest->getCheck( 'history' );
+               if( $historyCheck ) {
+                       $history = MW_EXPORT_FULL;
+               } else {
+                       $history = MW_EXPORT_CURRENT;
+               }
        }
        if( !$wgExportAllowHistory ) {
                // Override