Page MenuHomePhorge

No OneTemporary

Size
7 KB
Referenced Files
None
Subscribers
None
diff --git a/includes/htmlform/fields/HTMLCheckField.php b/includes/htmlform/fields/HTMLCheckField.php
index a9071d46124..0c6ec1da1bf 100644
--- a/includes/htmlform/fields/HTMLCheckField.php
+++ b/includes/htmlform/fields/HTMLCheckField.php
@@ -8,7 +8,6 @@ use MediaWiki\HTMLForm\HTMLFormField;
use MediaWiki\HTMLForm\OOUIHTMLForm;
use MediaWiki\HTMLForm\VFormHTMLForm;
use MediaWiki\Request\WebRequest;
-use MediaWiki\Xml\Xml;
/**
* A checkbox field
@@ -44,7 +43,7 @@ class HTMLCheckField extends HTMLFormField {
$isVForm = $this->mParent instanceof VFormHTMLForm;
$chkDivider = "\u{00A0}";
- $chkLabel = Xml::check( $this->mName, $value, $attr ) .
+ $chkLabel = Html::check( $this->mName, $value, $attr ) .
$chkDivider .
Html::rawElement( 'label', $attrLabel, $this->mLabel );
@@ -120,7 +119,7 @@ class HTMLCheckField extends HTMLFormField {
// Construct the component.
$checkIcon = "<span class=\"cdx-checkbox__icon\">\u{00A0}</span>";
- $innerContent = Xml::check( $this->mName, $value, $attribs ) .
+ $innerContent = Html::check( $this->mName, $value, $attribs ) .
$checkIcon .
Html::rawElement( 'label', $labelAttribs, $this->mLabel );
return Html::rawElement(
diff --git a/includes/htmlform/fields/HTMLCheckMatrix.php b/includes/htmlform/fields/HTMLCheckMatrix.php
index a0bf967dad6..d08d131dedc 100644
--- a/includes/htmlform/fields/HTMLCheckMatrix.php
+++ b/includes/htmlform/fields/HTMLCheckMatrix.php
@@ -7,7 +7,6 @@ use MediaWiki\HTMLForm\HTMLFormField;
use MediaWiki\HTMLForm\HTMLFormFieldRequiredOptionsException;
use MediaWiki\HTMLForm\HTMLNestedFilterable;
use MediaWiki\Request\WebRequest;
-use MediaWiki\Xml\Xml;
/**
* A checkbox matrix
@@ -192,7 +191,7 @@ class HTMLCheckMatrix extends HTMLFormField implements HTMLNestedFilterable {
}
protected function getOneCheckboxHTML( $checked, $attribs ) {
- return Xml::check( "{$this->mName}[]", $checked, $attribs );
+ return Html::check( "{$this->mName}[]", $checked, $attribs );
}
protected function isTagForcedOff( $tag ) {
diff --git a/includes/htmlform/fields/HTMLMultiSelectField.php b/includes/htmlform/fields/HTMLMultiSelectField.php
index face4e10062..b39e8d2a5be 100644
--- a/includes/htmlform/fields/HTMLMultiSelectField.php
+++ b/includes/htmlform/fields/HTMLMultiSelectField.php
@@ -8,7 +8,6 @@ use MediaWiki\HTMLForm\HTMLNestedFilterable;
use MediaWiki\HTMLForm\OOUIHTMLForm;
use MediaWiki\Request\WebRequest;
use MediaWiki\Widget\MenuTagMultiselectWidget;
-use MediaWiki\Xml\Xml;
use RuntimeException;
/**
@@ -155,7 +154,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
throw new RuntimeException( __METHOD__ . ' is not supported' );
} else {
$checkbox =
- Xml::check( "{$this->mName}[]", $checked, $attribs ) .
+ Html::check( "{$this->mName}[]", $checked, $attribs ) .
"\u{00A0}" .
Html::rawElement(
'label',
diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php
index 72acc94e6fd..cb1d1cd04cb 100644
--- a/includes/installer/WebInstaller.php
+++ b/includes/installer/WebInstaller.php
@@ -923,7 +923,7 @@ class WebInstaller extends Installer {
return "<div class=\"cdx-checkbox\" style=\"margin-top: 12px; margin-bottom: 2px;\">" .
"<div class=\"cdx-checkbox__wrapper\">\n" .
- Xml::check(
+ Html::check(
$params['controlName'],
$params['value'],
$params['attribs'] + [
diff --git a/includes/specials/SpecialRecentChangesLinked.php b/includes/specials/SpecialRecentChangesLinked.php
index 758ccca493a..0cb47f2d871 100644
--- a/includes/specials/SpecialRecentChangesLinked.php
+++ b/includes/specials/SpecialRecentChangesLinked.php
@@ -324,7 +324,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
$extraOpts['target'] = [ $this->msg( 'recentchangeslinked-page' )->escaped(),
Xml::input( 'target', 40, str_replace( '_', ' ', $opts['target'] ) ) . ' ' .
- Xml::check( 'showlinkedto', $opts['showlinkedto'], [ 'id' => 'showlinkedto' ] ) . ' ' .
+ Html::check( 'showlinkedto', $opts['showlinkedto'], [ 'id' => 'showlinkedto' ] ) . ' ' .
Xml::label( $this->msg( 'recentchangeslinked-to' )->text(), 'showlinkedto' ) ];
$this->addHelpLink( 'Help:Related changes' );
diff --git a/tests/phpunit/integration/includes/HTMLForm/Field/HTMLCheckFieldTest.php b/tests/phpunit/integration/includes/HTMLForm/Field/HTMLCheckFieldTest.php
index 3d7d0913c0c..70e75b41922 100644
--- a/tests/phpunit/integration/includes/HTMLForm/Field/HTMLCheckFieldTest.php
+++ b/tests/phpunit/integration/includes/HTMLForm/Field/HTMLCheckFieldTest.php
@@ -20,7 +20,7 @@ class HTMLCheckFieldTest extends HTMLFormFieldTestCase {
false,
<<<HTML
<div class="cdx-checkbox">
- <input name="testfield" type="checkbox" value="1" id="mw-input-testfield" class=" cdx-checkbox__input" />
+ <input id="mw-input-testfield" class="cdx-checkbox__input" type="checkbox" value="1" name="testfield">
<span class="cdx-checkbox__icon">\u{00A0}</span>
<label for="mw-input-testfield" class="cdx-checkbox__label">Check me</label>
</div>
@@ -36,7 +36,7 @@ class HTMLCheckFieldTest extends HTMLFormFieldTestCase {
false,
<<<HTML
<div class="cdx-checkbox">
- <input name="testfield" type="checkbox" value="1" checked="checked" id="mw-input-testfield" class="my-checkbox cdx-checkbox__input" />
+ <input id="mw-input-testfield" class="my-checkbox cdx-checkbox__input" checked="" type="checkbox" value="1" name="testfield">
<span class="cdx-checkbox__icon">\u{00A0}</span>
<label for="mw-input-testfield" class="cdx-checkbox__label">Check me</label>
</div>
@@ -52,7 +52,7 @@ class HTMLCheckFieldTest extends HTMLFormFieldTestCase {
false,
<<<HTML
<div class="cdx-checkbox">
- <input name="testfield" type="checkbox" value="1" checked="checked" id="mw-input-testfield" class=" cdx-checkbox__input" />
+ <input id="mw-input-testfield" class="cdx-checkbox__input" checked="" type="checkbox" value="1" name="testfield">
<span class="cdx-checkbox__icon">\u{00A0}</span>
<label for="mw-input-testfield" class="cdx-checkbox__label">Check me</label>
</div>
@@ -68,7 +68,7 @@ class HTMLCheckFieldTest extends HTMLFormFieldTestCase {
true,
<<<HTML
<div class="cdx-checkbox cdx-checkbox--status-error">
- <input name="testfield" type="checkbox" value="1" id="mw-input-testfield" disabled="" class=" cdx-checkbox__input" />
+ <input id="mw-input-testfield" disabled="" class="cdx-checkbox__input" type="checkbox" value="1" name="testfield">
<span class="cdx-checkbox__icon">\u{00A0}</span>
<label for="mw-input-testfield" class="cdx-checkbox__label">Check me</label>
</div>
@@ -84,7 +84,7 @@ class HTMLCheckFieldTest extends HTMLFormFieldTestCase {
false,
<<<HTML
<div class="cdx-checkbox" title="Add this page to your watchlist [w]">
- <input name="testfield" type="checkbox" value="1" title="Add this page to your watchlist [w]" accesskey="w" id="mw-input-testfield" class=" cdx-checkbox__input" />
+ <input title="Add this page to your watchlist [w]" accesskey="w" id="mw-input-testfield" class="cdx-checkbox__input" type="checkbox" value="1" name="testfield">
<span class="cdx-checkbox__icon">\u{00A0}</span>
<label for="mw-input-testfield" class="cdx-checkbox__label">Watch</label>
</div>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Jul 5, 5:31 AM (11 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
227425
Default Alt Text
(7 KB)

Event Timeline