}
$descriptor['UploadFile'] = [
- 'class' => 'UploadSourceField',
+ 'class' => UploadSourceField::class,
'section' => 'source',
'type' => 'file',
'id' => 'wpUploadFile',
if ( $canUploadByUrl ) {
$this->mMaxUploadSize['url'] = UploadBase::getMaxUploadSize( 'url' );
$descriptor['UploadFileURL'] = [
- 'class' => 'UploadSourceField',
+ 'class' => UploadSourceField::class,
'section' => 'source',
'id' => 'wpUploadFileURL',
'radio-id' => 'wpSourceTypeurl',
} else {
$descriptor['License'] = [
'type' => 'select',
- 'class' => 'Licenses',
+ 'class' => Licenses::class,
'section' => 'description',
'id' => 'wpLicense',
'label-message' => 'license',
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