SpecialUpload: Stop loading 'mediawiki.action.edit'
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 4 Sep 2017 16:04:28 +0000 (18:04 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 4 Sep 2017 16:04:28 +0000 (18:04 +0200)
The comment says it's for <charinsert> support, but that's not true
anymore, as the CharInsert extension itself takes care of loading its
script on Special:Upload (see CharInsert::onBeforePageDisplay()).

Back in the day, this module included a lot more stuff related to the
edit toolbar and such, so this might have been warranted, but there is
nothing useful for uploading left in it anymore.

It's very unintuitive that it would be loaded there; folks did not
realize that it is the case and recent changes to the module started
causing issues on Special:Upload.

Bug: T174935
Change-Id: I11e886801a27f796e5a5935ec9c93b1329cc5b87

includes/specials/SpecialUpload.php

index 4cdc78f..d0eb8e3 100644 (file)
@@ -1256,7 +1256,6 @@ class UploadForm extends HTMLForm {
                $out->addJsConfigVars( $scriptVars );
 
                $out->addModules( [
-                       'mediawiki.action.edit', // For <charinsert> support
                        'mediawiki.special.upload', // Extras for thumbnail and license preview.
                ] );
        }