Page MenuHomePhabricator

diff.diff

Authored By
bzimport
Nov 21 2014, 10:37 PM
Size
1 KB
Referenced Files
None
Subscribers
None

diff.diff

Index: api/ApiFormatXml.php
===================================================================
--- api/ApiFormatXml.php (revision 59374)
+++ api/ApiFormatXml.php (working copy)
@@ -173,7 +173,7 @@
$this->setWarning( 'Stylesheet should have .xsl extension.' );
return;
}
- $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw' ) . '" type="text/xml" ?>' );
+ $this->printText( '<?xml-stylesheet href="' . $nt->escapeLocalURL( 'action=raw&ctype=application/xml' ) . '" type="text/xsl" ?>' );
}
public function getAllowedParams() {
Index: RawPage.php
===================================================================
--- RawPage.php (revision 59374)
+++ RawPage.php (working copy)
@@ -26,6 +26,9 @@
$allowedCTypes = array('text/x-wiki', $wgJsMimeType, 'text/css', 'application/x-zope-edit');
$this->mArticle =& $article;
$this->mTitle =& $article->mTitle;
+ if ($article->mTitle->getNamespace() == NS_MEDIAWIKI) {
+ $allowedCTypes[] = 'application/xml';
+ }
if( $request === false ) {
$this->mRequest =& $wgRequest;

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5259
Default Alt Text
diff.diff (1 KB)

Event Timeline