Phantom42 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405555 )
Change subject: Fix multiple PHP class declarations in one file in
includes/htmlform
......................................................................
Fix multiple PHP class declarations in one file in includes/htmlform
All files containing more than one PHP class were splitted into
multiple files. Autoloader references were updated to match new
class locations.
Bug: T177809
Change-Id: I5c39293b4d96fba821a9c9a1ece9d9907303c6cf
---
M autoload.php
A includes/htmlform/HTMLFormActionFieldLayout.php
M includes/htmlform/HTMLFormElement.php
A includes/htmlform/HTMLFormFieldLayout.php
4 files changed, 34 insertions(+), 32 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/55/405555/1
diff --git a/autoload.php b/autoload.php
index 9e557e1..0736657 100644
--- a/autoload.php
+++ b/autoload.php
@@ -562,11 +562,11 @@
'HTMLFileCache' => __DIR__ . '/includes/cache/HTMLFileCache.php',
'HTMLFloatField' => __DIR__ .
'/includes/htmlform/fields/HTMLFloatField.php',
'HTMLForm' => __DIR__ . '/includes/htmlform/HTMLForm.php',
- 'HTMLFormActionFieldLayout' => __DIR__ .
'/includes/htmlform/HTMLFormElement.php',
+ 'HTMLFormActionFieldLayout' => __DIR__ .
'/includes/htmlform/HTMLFormActionFieldLayout.php',
'HTMLFormElement' => __DIR__ . '/includes/htmlform/HTMLFormElement.php',
'HTMLFormField' => __DIR__ . '/includes/htmlform/HTMLFormField.php',
'HTMLFormFieldCloner' => __DIR__ .
'/includes/htmlform/fields/HTMLFormFieldCloner.php',
- 'HTMLFormFieldLayout' => __DIR__ .
'/includes/htmlform/HTMLFormElement.php',
+ 'HTMLFormFieldLayout' => __DIR__ .
'/includes/htmlform/HTMLFormFieldLayout.php',
'HTMLFormFieldRequiredOptionsException' => __DIR__ .
'/includes/htmlform/HTMLFormFieldRequiredOptionsException.php',
'HTMLFormFieldWithButton' => __DIR__ .
'/includes/htmlform/fields/HTMLFormFieldWithButton.php',
'HTMLHiddenField' => __DIR__ .
'/includes/htmlform/fields/HTMLHiddenField.php',
diff --git a/includes/htmlform/HTMLFormActionFieldLayout.php
b/includes/htmlform/HTMLFormActionFieldLayout.php
new file mode 100644
index 0000000..2c08224
--- /dev/null
+++ b/includes/htmlform/HTMLFormActionFieldLayout.php
@@ -0,0 +1,16 @@
+<?php
+
+class HTMLFormActionFieldLayout extends OOUI\ActionFieldLayout {
+ use HTMLFormElement;
+
+ public function __construct( $fieldWidget, $buttonWidget = false, array
$config = [] ) {
+ parent::__construct( $fieldWidget, $buttonWidget, $config );
+
+ // Traits
+ $this->initializeHTMLFormElement( $config );
+ }
+
+ protected function getJavaScriptClassName() {
+ return 'mw.htmlform.ActionFieldLayout';
+ }
+}
diff --git a/includes/htmlform/HTMLFormElement.php
b/includes/htmlform/HTMLFormElement.php
index 66d6143..5f32fdb 100644
--- a/includes/htmlform/HTMLFormElement.php
+++ b/includes/htmlform/HTMLFormElement.php
@@ -33,33 +33,3 @@
} );
}
}
-
-class HTMLFormFieldLayout extends OOUI\FieldLayout {
- use HTMLFormElement;
-
- public function __construct( $fieldWidget, array $config = [] ) {
- parent::__construct( $fieldWidget, $config );
-
- // Traits
- $this->initializeHTMLFormElement( $config );
- }
-
- protected function getJavaScriptClassName() {
- return 'mw.htmlform.FieldLayout';
- }
-}
-
-class HTMLFormActionFieldLayout extends OOUI\ActionFieldLayout {
- use HTMLFormElement;
-
- public function __construct( $fieldWidget, $buttonWidget = false, array
$config = [] ) {
- parent::__construct( $fieldWidget, $buttonWidget, $config );
-
- // Traits
- $this->initializeHTMLFormElement( $config );
- }
-
- protected function getJavaScriptClassName() {
- return 'mw.htmlform.ActionFieldLayout';
- }
-}
diff --git a/includes/htmlform/HTMLFormFieldLayout.php
b/includes/htmlform/HTMLFormFieldLayout.php
new file mode 100644
index 0000000..ce93db2
--- /dev/null
+++ b/includes/htmlform/HTMLFormFieldLayout.php
@@ -0,0 +1,16 @@
+<?php
+
+class HTMLFormFieldLayout extends OOUI\FieldLayout {
+ use HTMLFormElement;
+
+ public function __construct( $fieldWidget, array $config = [] ) {
+ parent::__construct( $fieldWidget, $config );
+
+ // Traits
+ $this->initializeHTMLFormElement( $config );
+ }
+
+ protected function getJavaScriptClassName() {
+ return 'mw.htmlform.FieldLayout';
+ }
+}
--
To view, visit https://gerrit.wikimedia.org/r/405555
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c39293b4d96fba821a9c9a1ece9d9907303c6cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Phantom42 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits