Index: trunk/phase3/skins/common/upload.js |
— | — | @@ -242,7 +242,7 @@ |
243 | 243 | // Clear the filename if it does not have a valid extension. |
244 | 244 | // URLs are less likely to have a useful extension, so don't include them in the |
245 | 245 | // extension check. |
246 | | - if( wgFileExtensions && id != 'wpUploadFileURL' ) { |
| 246 | + if( $wgStrictFileExtensions && wgFileExtensions && id != 'wpUploadFileURL' ) { |
247 | 247 | var found = false; |
248 | 248 | if( fname.lastIndexOf( '.' ) != -1 ) { |
249 | 249 | var ext = fname.substr( fname.lastIndexOf( '.' ) + 1 ); |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -1044,7 +1044,7 @@ |
1045 | 1045 | * Add upload JS to $wgOut |
1046 | 1046 | */ |
1047 | 1047 | protected function addUploadJS() { |
1048 | | - global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI; |
| 1048 | + global $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview, $wgEnableAPI, $wgStrictFileExtensions; |
1049 | 1049 | global $wgOut; |
1050 | 1050 | |
1051 | 1051 | $useAjaxDestCheck = $wgUseAjax && $wgAjaxUploadDestCheck; |
— | — | @@ -1058,6 +1058,7 @@ |
1059 | 1059 | // the wpDestFile textbox |
1060 | 1060 | $this->mDestFile === '', |
1061 | 1061 | 'wgUploadSourceIds' => $this->mSourceIds, |
| 1062 | + 'wgStrictFileExtensions' => $wgStrictFileExtensions, |
1062 | 1063 | ); |
1063 | 1064 | |
1064 | 1065 | $wgOut->addScript( Skin::makeVariablesScript( $scriptVars ) ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -221,6 +221,7 @@ |
222 | 222 | * (bug 23642) Recognize mime types of MS OpenXML documents. |
223 | 223 | * (bug 22784) Normalise underscores and spaces in autocomments. |
224 | 224 | * (bug 19910) Headings of the form ===+\s+ are now displayed as valid headings |
| 225 | +* (bug 24022) Only check file extensions on the uploadpage when needed. |
225 | 226 | |
226 | 227 | === API changes in 1.17 === |
227 | 228 | * (bug 22738) Allow filtering by action type on query=logevent. |