Index: trunk/phase3/includes/specials/SpecialExport.php |
— | — | @@ -191,10 +191,22 @@ |
192 | 192 | private function doExport( $page, $history, $list_authors ) { |
193 | 193 | global $wgExportMaxHistory; |
194 | 194 | |
195 | | - /* Split up the input and look up linked pages */ |
196 | | - $inputPages = array_filter( explode( "\n", $page ), array( $this, 'filterPage' ) ); |
197 | | - $pageSet = array_flip( $inputPages ); |
| 195 | + $pageSet = array(); // Inverted index of all pages to look up |
198 | 196 | |
| 197 | + // Split up and normalize input |
| 198 | + foreach( explode( "\n", $page ) as $pageName ) { |
| 199 | + $pageName = trim( $pageName ); |
| 200 | + $title = Title::newFromText( $pageName ); |
| 201 | + if( $title && $title->getInterwiki() == '' && $title->getText() != '' ) { |
| 202 | + // Only record each page once! |
| 203 | + $pageSet[$title->getPrefixedText()] = true; |
| 204 | + } |
| 205 | + } |
| 206 | + |
| 207 | + // Set of original pages to pass on to further manipulation... |
| 208 | + $inputPages = array_keys( $pageSet ); |
| 209 | + |
| 210 | + // Look up any linked pages if asked... |
199 | 211 | if( $this->templates ) { |
200 | 212 | $pageSet = $this->getTemplates( $inputPages, $pageSet ); |
201 | 213 | } |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -301,6 +301,7 @@ |
302 | 302 | * (bug 17139) ts_resortTable inconsistent trimming makes date sorting fragile |
303 | 303 | * (bug 19445) Change oldimage table to use ON UPDATE CASCADE for FK to image table. |
304 | 304 | * (bug 14080) Short notation links to subpages didn't work in edit summaries |
| 305 | +* (bug 17374) Special:Export no longer exports multiple copies of pages |
305 | 306 | |
306 | 307 | == API changes in 1.16 == |
307 | 308 | |