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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
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)
1.11.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


Attachments

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
tmpfile
header and
readfile
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
                wfResetOutputBuffers();
                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.


Navigation
Links