* (bug 23642) Recognize mime types of MS OpenXML documents.
* (bug 22784) Normalise underscores and spaces in autocomments.
* (bug 19910) Headings of the form ===+\s+ are now displayed as valid headings
+* (bug 24022) Only check file extensions on the uploadpage when needed.
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent.
* Add upload JS to $wgOut
*/
protected function addUploadJS() {
- global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI;
+ global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI, $wgStrictFileExtensions;
global $wgOut;
$useAjaxDestCheck = $wgUseAjax && $wgAjaxUploadDestCheck;
// the wpDestFile textbox
$this->mDestFile === '',
'wgUploadSourceIds' => $this->mSourceIds,
+ 'wgStrictFileExtensions' => $wgStrictFileExtensions,
);
$wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) );
// Clear the filename if it does not have a valid extension.
// URLs are less likely to have a useful extension, so don't include them in the
// extension check.
- if( wgFileExtensions && id != 'wpUploadFileURL' ) {
+ if( $wgStrictFileExtensions && wgFileExtensions && id != 'wpUploadFileURL' ) {
var found = false;
if( fname.lastIndexOf( '.' ) != -1 ) {
var ext = fname.substr( fname.lastIndexOf( '.' ) + 1 );