From 8db93e6dd7280638c8f2ee96d6a96471fedefe51 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 26 Mar 2009 03:29:06 +0000 Subject: [PATCH] (bug 18031) Make namespace selector on Special:Export remember the previous selection --- RELEASE-NOTES | 2 ++ includes/specials/SpecialExport.php | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7aabc7012a..59cc122585 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -290,6 +290,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 17241) The diffonly URI parameter should cascade to "Next edit" and "Previous edit" diff links * (bug 16823) 'Sidebar search form should not use Special:Search view URL as target' * (bug 16343) Non-existing, but in use, category pages can be "go" match hits +* (bug 18031) Make namespace selector on Special:Export remember the previous + selection == API changes in 1.15 == * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 2f40c73203..306eaf91b2 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -65,9 +65,9 @@ class SpecialExport extends SpecialPage { } else if( $wgRequest->getCheck( 'addns' ) && $wgExportFromNamespaces ) { $page = $wgRequest->getText( 'pages' ); - $nsindex = $wgRequest->getText( 'nsindex' ); + $nsindex = $wgRequest->getText( 'nsindex', '' ); - if ( $nsindex !== '' && $nsindex !== NULL && $nsindex !== false ) { + if ( $nsindex !== '' && $nsindex !== null && $nsindex !== false ) { /** * Same implementation as above, so same @fixme */ @@ -151,7 +151,7 @@ class SpecialExport extends SpecialPage { $form .= Xml::submitButton( wfMsg( 'export-addcat' ), array( 'name' => 'addcat' ) ) . '
'; if ( $wgExportFromNamespaces ) { - $form .= Xml::namespaceSelector( '', null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; + $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . ' '; $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '
'; } -- 2.20.1