X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2Finstaller%2FWebInstaller.php;h=8fb980791e787685465e103b6bd7a57943daf36c;hb=ae051b4a12763445fe96bed7b4fa925a266dad90;hp=e0e54c845bd295723507d767a1db612dd31278da;hpb=fc5af1cb1c6fe7516fa045c90187d7def05223ba;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index e0e54c845b..8fb980791e 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -155,6 +155,10 @@ class WebInstaller extends Installer { if ( isset( $session['settings'] ) ) { $this->settings = $session['settings'] + $this->settings; + // T187586 MediaWikiServices works with globals + foreach ( $this->settings as $key => $val ) { + $GLOBALS[$key] = $val; + } } $this->setupLanguage(); @@ -911,6 +915,7 @@ class WebInstaller extends Installer { * Parameters are: * var: The variable to be configured (required) * label: The message name for the label (required) + * labelAttribs:Additional attributes for the label element (optional) * attribs: Additional attributes for the input element (optional) * controlName: The name for the input element (optional) * value: The current value of the variable (optional) @@ -933,6 +938,9 @@ class WebInstaller extends Installer { if ( !isset( $params['help'] ) ) { $params['help'] = ""; } + if ( !isset( $params['labelAttribs'] ) ) { + $params['labelAttribs'] = []; + } if ( isset( $params['rawtext'] ) ) { $labelText = $params['rawtext']; } else { @@ -941,17 +949,19 @@ class WebInstaller extends Installer { return "
\n" . $params['help'] . - "\n" . + Html::rawElement( + 'label', + $params['labelAttribs'], + Xml::check( + $params['controlName'], + $params['value'], + $params['attribs'] + [ + 'id' => $params['controlName'], + 'tabindex' => $this->nextTabIndex(), + ] + ) . + $labelText . "\n" + ) . "
\n"; }