Last modified: 2007-07-16 16:14:56 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T12603, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 10603 - Special:Exportpages should export a file, not a website
Special:Exportpages should export a file, not a website
Status: RESOLVED DUPLICATE of bug 3173
Product: MediaWiki
Classification: Unclassified
Special pages (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-07-16 15:58 UTC by Thorsten Staerk
Modified: 2007-07-16 16:14 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Thorsten Staerk 2007-07-16 15:58:14 UTC
When using Special:Exportpages to export all my pages, it would be better to get a file instead an XML in a browserwindow. Because if XML is shown in a browserwindow, all tags are omitted.

I am about to write a patch for that using the php commands
header and
Comment 1 Rob Church 2007-07-16 16:04:47 UTC
Not sure if this is required; browsers give the option to save as XML. I suppose we could emit the appropriate Content-disposition header to encourage the user agent to offer to save as a file instead, but on the whole, I'm not sure *that* is needed, either.
Comment 2 Brion Vibber 2007-07-16 16:07:02 UTC

*** This bug has been marked as a duplicate of bug 3173 ***
Comment 3 Thorsten Staerk 2007-07-16 16:14:56 UTC
Here's the patch:

--- SpecialExport-0.php 2007-07-16 18:11:59.000000000 +0200
+++ SpecialExport.php   2007-07-16 18:10:22.000000000 +0200
@@ -151,6 +151,7 @@ function wfSpecialExport( $page = '' ) {
                // This should provide safer streaming for pages with history
                header( "Content-type: application/xml; charset=utf-8");
+                header("Content-Disposition: attachment" );
                $pages = explode( "\n", $page );

                $db = wfGetDB( DB_SLAVE );

Note You need to log in before you can comment on or make changes to this bug.