Revert r34619, r34622 and do it right. :)
* $extensionsList is a local variable, not a global, so there is no actual register_globals danger -- just annoying E_NOTICE spam. * Setting $extensionList won't help with warnings about unset $extensionsList ;) * Cleaner to set it in the fallback case near where it's set otherwise, rather than at the top of the function far, far away from its use
This commit is contained in:
parent
610b660d8e
commit
044dca14bc
1 changed files with 3 additions and 5 deletions
|
|
@ -900,11 +900,6 @@ class UploadForm {
|
|||
$useAjaxDestCheck = $wgUseAjax && $wgAjaxUploadDestCheck;
|
||||
$useAjaxLicensePreview = $wgUseAjax && $wgAjaxLicensePreview;
|
||||
|
||||
// Initilaize $extensionList here in case it is not set later on
|
||||
// (which would cause a E_NOTICE) and it must not be set only if it
|
||||
// isn't set to avoid a possible register_globals issue.
|
||||
$extensionList = '';
|
||||
|
||||
$adc = wfBoolToStr( $useAjaxDestCheck );
|
||||
$alp = wfBoolToStr( $useAjaxLicensePreview );
|
||||
$autofill = wfBoolToStr( $this->mDesiredDestName == '' );
|
||||
|
|
@ -985,6 +980,9 @@ wgUploadAutoFill = {$autofill};
|
|||
wfMsgWikiHtml( 'upload-prohibited', implode( $wgFileBlacklist, $delim ) ) .
|
||||
"</div>\n";
|
||||
}
|
||||
} else {
|
||||
# Everything is permitted.
|
||||
$extensionsList = '';
|
||||
}
|
||||
|
||||
# Get the maximum file size from php.ini as $wgMaxUploadSize works for uploads from URL via CURL only
|
||||
|
|
|
|||
Loading…
Reference in a new issue