aboutsummaryrefslogtreecommitdiffstats
path: root/includes/htmlform/fields/HTMLCheckMatrix.php
diff options
context:
space:
mode:
authorAryeh Gregor <ayg@aryeh.name>2022-04-25 18:19:41 +0300
committerAryeh Gregor <ayg@aryeh.name>2022-04-26 14:31:26 +0300
commit4a52bf553f3040503f4ce9f6de90b106bc3a9db7 (patch)
tree11dc34aecb3cb3bbe3d339fd44f8fdc25da31b79 /includes/htmlform/fields/HTMLCheckMatrix.php
parentfd762bb138f8091507b9683c3913b8576e4ec582 (diff)
downloadmediawikicore-4a52bf553f3040503f4ce9f6de90b106bc3a9db7.tar.gz
mediawikicore-4a52bf553f3040503f4ce9f6de90b106bc3a9db7.zip
Use MainConfigNames instead of string literals, #3
This edition brought to you by: grep -ERIn $(grep -o "'[A-Za-z0-9_]*'" includes/MainConfigNames.php | tr "\n" '|' | sed 's/|$/\n/') includes/ I only corrected a fraction of the results provided by that command. I'm submitting the partial patch now so it doesn't bitrot. Bug: T305805 Change-Id: If1918c0b3d88cdf90403921e4310740e206d6962
Diffstat (limited to 'includes/htmlform/fields/HTMLCheckMatrix.php')
-rw-r--r--includes/htmlform/fields/HTMLCheckMatrix.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/includes/htmlform/fields/HTMLCheckMatrix.php b/includes/htmlform/fields/HTMLCheckMatrix.php
index e95371b39052..71143d9c4eac 100644
--- a/includes/htmlform/fields/HTMLCheckMatrix.php
+++ b/includes/htmlform/fields/HTMLCheckMatrix.php
@@ -1,5 +1,7 @@
<?php
+use MediaWiki\MainConfigNames;
+
/**
* A checkbox matrix
* Operates similarly to HTMLMultiSelectField, but instead of using an array of
@@ -177,7 +179,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
protected function getOneCheckboxHTML( $checked, $attribs ) {
$checkbox = Xml::check( "{$this->mName}[]", $checked, $attribs );
- if ( $this->mParent->getConfig()->get( 'UseMediaWikiUIEverywhere' ) ) {
+ if ( $this->mParent->getConfig()->get( MainConfigNames::UseMediaWikiUIEverywhere ) ) {
$checkbox = Html::openElement( 'div', [ 'class' => 'mw-ui-checkbox' ] ) .
$checkbox .
Html::element( 'label', [ 'for' => $attribs['id'] ] ) .