X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fspecials%2Fforms%2FUploadForm.php;h=e561fe588298b2b00c5d9e5f8f3a33c35cf359f7;hb=bf61efd87;hp=44d91a8a2621758383f96fabf1a4b14a4b8fab3a;hpb=426719108b86bba70e5b321e3386f40849471426;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/forms/UploadForm.php b/includes/specials/forms/UploadForm.php index 44d91a8a26..e561fe5882 100644 --- a/includes/specials/forms/UploadForm.php +++ b/includes/specials/forms/UploadForm.php @@ -159,7 +159,7 @@ class UploadForm extends HTMLForm { } $descriptor['UploadFile'] = [ - 'class' => 'UploadSourceField', + 'class' => UploadSourceField::class, 'section' => 'source', 'type' => 'file', 'id' => 'wpUploadFile', @@ -174,7 +174,7 @@ class UploadForm extends HTMLForm { if ( $canUploadByUrl ) { $this->mMaxUploadSize['url'] = UploadBase::getMaxUploadSize( 'url' ); $descriptor['UploadFileURL'] = [ - 'class' => 'UploadSourceField', + 'class' => UploadSourceField::class, 'section' => 'source', 'id' => 'wpUploadFileURL', 'radio-id' => 'wpSourceTypeurl', @@ -322,7 +322,7 @@ class UploadForm extends HTMLForm { } else { $descriptor['License'] = [ 'type' => 'select', - 'class' => 'Licenses', + 'class' => Licenses::class, 'section' => 'description', 'id' => 'wpLicense', 'label-message' => 'license', @@ -406,14 +406,11 @@ class UploadForm extends HTMLForm { protected function addUploadJS() { $config = $this->getConfig(); - $useAjaxDestCheck = $config->get( 'UseAjax' ) && $config->get( 'AjaxUploadDestCheck' ); - $useAjaxLicensePreview = $config->get( 'UseAjax' ) && - $config->get( 'AjaxLicensePreview' ) && $config->get( 'EnableAPI' ); $this->mMaxUploadSize['*'] = UploadBase::getMaxUploadSize(); $scriptVars = [ - 'wgAjaxUploadDestCheck' => $useAjaxDestCheck, - 'wgAjaxLicensePreview' => $useAjaxLicensePreview, + 'wgAjaxUploadDestCheck' => $config->get( 'AjaxUploadDestCheck' ), + 'wgAjaxLicensePreview' => $config->get( 'AjaxLicensePreview' ), 'wgUploadAutoFill' => !$this->mForReUpload && // If we received mDestFile from the request, don't autofill // the wpDestFile textbox