(bug 17374) Special:Export no longer exports two copies of the same page
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 27 Mar 2009 22:01:12 +0000 (22:01 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 27 Mar 2009 22:01:12 +0000 (22:01 +0000)
RELEASE-NOTES
includes/specials/SpecialExport.php

index 783f353..aa5e6a6 100644 (file)
@@ -294,6 +294,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 18031) Make namespace selector on Special:Export remember the previous 
   selection
 * The svn-version version numbers on Special:Version have been removed
+* (bug 17374) Special:Export no longer exports two copies of the same page
 
 == API changes in 1.15 ==
 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions
index 306eaf9..71ed4d4 100644 (file)
@@ -210,7 +210,13 @@ class SpecialExport extends SpecialPage {
                 */
                
                $pages = array_keys( $pageSet );
-               
+
+               // Normalize titles to the same format and remove dupes, see bug 17374
+               foreach( $pages as $k => $v ) {
+                       $pages[$k] = str_replace( " ", "_", $v );
+               }
+               $pages = array_unique( $pages );
+
                /* Ok, let's get to it... */
                if( $history == WikiExporter::CURRENT ) {
                        $lb = false;