From 517fcaedcac551dc6db246e99bdf07178d3f1cea Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Fri, 27 Mar 2009 22:01:12 +0000 Subject: [PATCH] (bug 17374) Special:Export no longer exports two copies of the same page --- RELEASE-NOTES | 1 + includes/specials/SpecialExport.php | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 783f35377f..aa5e6a6ae0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/specials/SpecialExport.php b/includes/specials/SpecialExport.php index 306eaf91b2..71ed4d4b0c 100644 --- a/includes/specials/SpecialExport.php +++ b/includes/specials/SpecialExport.php @@ -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; -- 2.20.1