From 251ceb80c8f2a173724b6c3e5995994786074a91 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 15 Aug 2006 15:50:21 +0000 Subject: [PATCH] * (bug 6946) Fix unexpected behavior change with GET hits to Special:Export --- RELEASE-NOTES | 1 + includes/SpecialExport.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2c86234e91..be0f65a7ed 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialExport.php b/includes/SpecialExport.php index 39e1d26882..e3ba023d83 100644 --- a/includes/SpecialExport.php +++ b/includes/SpecialExport.php @@ -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 -- 2.20.1