Template:Xml upload: Difference between revisions

(Created page with "{{Textbox|boxtype=important|header=XML file type:{{Bsvs|bsvFrom=4.x+}}|text=The ''xml'' file type is blacklisted since MW 1.39 and has to be allowed in ''LocalSettings.php'': <pre> $GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] ); $GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] ); </pre>|icon=no}}")
Tag: 2017 source edit
 
No edit summary
Tag: 2017 source edit
Line 1: Line 1:
{{Textbox|boxtype=important|header=XML file type:{{Bsvs|bsvFrom=4.x+}}|text=The ''xml'' file type is blacklisted since MW 1.39 and has to be allowed in ''LocalSettings.php'':
{{Textbox|boxtype=important|header=XML file type:{{Bsvs|bsvFrom=4.x+}}|text=The ''xml'' file type is blacklisted since MW 1.39 and has to be allowed in ''LocalSettings.php'':
<pre>
<syntaxhighlight lang="php">
$GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] );
$GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] );
$GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] );
$GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] );
</pre>|icon=no}}
</syntaxhighlight>|icon=no}}

Revision as of 13:51, 29 November 2023

XML file type:  v4.x++The xml file type is blacklisted since MW 1.39 and has to be allowed in LocalSettings.php:
$GLOBALS['wgProhibitedFileExtensions'] = array_diff( $GLOBALS['wgProhibitedFileExtensions'] ?? [], [ 'xml' ] );
$GLOBALS['wgMimeTypeExclusions'] = array_diff( $GLOBALS['wgMimeTypeExclusions'] ?? [], [ 'application/xml', 'text/xml' ] );