r48854 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48853‎ | r48854 | r48855 >
Date:03:29, 26 March 2009
Author:demon
Status:resolved (Comments)
Tags:
Comment:
(bug 18031) Make namespace selector on Special:Export remember the previous selection
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialExport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialExport.php
@@ -65,9 +65,9 @@
6666 }
6767 else if( $wgRequest->getCheck( 'addns' ) && $wgExportFromNamespaces ) {
6868 $page = $wgRequest->getText( 'pages' );
69 - $nsindex = $wgRequest->getText( 'nsindex' );
 69+ $nsindex = $wgRequest->getText( 'nsindex', '' );
7070
71 - if ( $nsindex !== '' && $nsindex !== NULL && $nsindex !== false ) {
 71+ if ( $nsindex !== '' && $nsindex !== null && $nsindex !== false ) {
7272 /**
7373 * Same implementation as above, so same @fixme
7474 */
@@ -151,7 +151,7 @@
152152 $form .= Xml::submitButton( wfMsg( 'export-addcat' ), array( 'name' => 'addcat' ) ) . '<br />';
153153
154154 if ( $wgExportFromNamespaces ) {
155 - $form .= Xml::namespaceSelector( '', null, 'nsindex', wfMsg( 'export-addnstext' ) ) . '&nbsp;';
 155+ $form .= Xml::namespaceSelector( $nsindex, null, 'nsindex', wfMsg( 'export-addnstext' ) ) . '&nbsp;';
156156 $form .= Xml::submitButton( wfMsg( 'export-addns' ), array( 'name' => 'addns' ) ) . '<br />';
157157 }
158158
Index: trunk/phase3/RELEASE-NOTES
@@ -290,6 +290,8 @@
291291 * (bug 17241) The diffonly URI parameter should cascade to "Next edit" and "Previous edit" diff links
292292 * (bug 16823) 'Sidebar search form should not use Special:Search view URL as target'
293293 * (bug 16343) Non-existing, but in use, category pages can be "go" match hits
 294+* (bug 18031) Make namespace selector on Special:Export remember the previous
 295+ selection
294296
295297 == API changes in 1.15 ==
296298 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Comments

#Comment by Brion VIBBER (talk | contribs)   00:15, 16 April 2009

Notice: Undefined variable: nsindex in /Library/WebServer/Documents/trunk/includes/specials/SpecialExport.php on line 154

#Comment by 😂 (talk | contribs)   00:19, 16 April 2009

Fixed in r49543

#Comment by Tim Starling (talk | contribs)   09:10, 19 May 2009

if ( $nsindex !== && $nsindex !== null && $nsindex !== false ) {

Note that the same effect can be achieved with the neater:

if ( strval( $nsindex ) !== ) {

#Comment by Tim Starling (talk | contribs)   09:12, 19 May 2009

Where the beginning of italics is the empty string.

#Comment by 😂 (talk | contribs)   14:54, 19 May 2009

Done in r50767

Status & tagging log