From: Robert Leverington Date: Sun, 11 May 2008 17:31:38 +0000 (+0000) Subject: Avoid possible register_globals issue. X-Git-Tag: 1.31.0-rc.0~47712 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=3c7435421a0235653a5c4547b5c48d78833c7053;p=lhc%2Fweb%2Fwiklou.git Avoid possible register_globals issue. --- diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 1df6dac5ac..61c3ef5157 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -900,6 +900,11 @@ 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 == '' ); @@ -1059,10 +1064,6 @@ wgUploadAutoFill = {$autofill}; $encComment = htmlspecialchars( $this->mComment ); - if( !isset( $extensionsList ) ) { - $extensionsList = ''; - } - $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL(), 'enctype' => 'multipart/form-data', 'id' => 'mw-upload-form' ) ) .