(bug 18031) Make namespace selector on Special:Export remember the previous selection
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 26 Mar 2009 03:29:06 +0000 (03:29 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 26 Mar 2009 03:29:06 +0000 (03:29 +0000)
RELEASE-NOTES
includes/specials/SpecialExport.php

index 7aabc70..59cc122 100644 (file)
@@ -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
index 2f40c73..306eaf9 100644 (file)
@@ -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' ) ) . '<br />';
                
                if ( $wgExportFromNamespaces ) {
-                       $form .= Xml::namespaceSelector( '', null, 'nsindex', wfMsg( 'export-addnstext' ) ) . '&nbsp;';
+                       $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . '&nbsp;';
                        $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '<br />';
                }