* $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
$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 == '' );
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