* @return array
*/
protected function getFormFields() {
- global $wgBlockAllowsUTEdit;
+ $conf = $this->getConfig();
+ $enablePartialBlocks = $conf->get( 'EnablePartialBlocks' );
+ $blockAllowsUTEdit = $conf->get( 'BlockAllowsUTEdit' );
$this->getOutput()->enableOOUI();
$suggestedDurations = self::getSuggestedDurations();
- $conf = $this->getConfig();
- $enablePartialBlocks = $conf->get( 'EnablePartialBlocks' );
-
$a = [];
$a['Target'] = [
];
}
- if ( $wgBlockAllowsUTEdit ) {
+ if ( $blockAllowsUTEdit ) {
$a['DisableUTEdit'] = [
'type' => 'check',
'label-message' => 'ipb-disableusertalk',
* the HTMLForm
* @param WebRequest|null $request Optionally try and get data from a request too
* @return array [ User|string|null, Block::TYPE_ constant|null ]
+ * @phan-return array{0:User|string|null,1:int|null}
*/
public static function getTargetAndType( $par, WebRequest $request = null ) {
$i = 0;
global $wgResourceBasePath;
return [
-
- /**
- * Special modules who have their own classes
- */
- 'startup' => [ 'class' => ResourceLoaderStartUpModule::class ],
-
// Scripts managed by the local wiki (stored in the MediaWiki namespace)
'site' => [ 'class' => ResourceLoaderSiteModule::class ],
'site.styles' => [ 'class' => ResourceLoaderSiteStylesModule::class ],
],
],
'mediawiki.action.history' => [
+ 'dependencies' => [ 'jquery.makeCollapsible' ],
'scripts' => 'resources/src/mediawiki.action/mediawiki.action.history.js',
'styles' => 'resources/src/mediawiki.action/mediawiki.action.history.css',
],
'mediawiki.action.history.styles' => [
'skinStyles' => [
- 'default' => 'resources/src/mediawiki.action/mediawiki.action.history.styles.css',
+ 'default' => 'resources/src/mediawiki.action/mediawiki.action.history.styles.less',
],
'targets' => [ 'desktop', 'mobile' ],
],
],
],
'mediawiki.special.block' => [
- 'scripts' => 'resources/src/mediawiki.special.block.js',
+ 'localBasePath' => "$IP/resources/src",
+ 'remoteBasePath' => "$wgResourceBasePath/resources/src",
+ 'packageFiles' => [
+ 'mediawiki.special.block.js',
+ [ 'name' => 'config.json', 'config' => [
+ 'EnablePartialBlocks',
+ 'BlockAllowsUTEdit',
+ ] ],
+ ],
'dependencies' => [
'oojs-ui-core',
'oojs-ui.styles.icons-editing-core',