Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/406136 )

Change subject: Fix multiple PHP class declarations in one file
......................................................................

Fix multiple PHP class declarations in one file

All files containing more than one PHP class were split into
multiple files.

extension.json was updated to match new class locations.

phpcs `OneObjectStructurePerFile.MultipleFound` rule was
re-enabled.

Bug: T177809
Change-Id: If3c9024ec5456a3fae17989b99d16f53b8c8165a
---
M .phpcs.xml
M extension.json
M includes/specials/SpecialUploadWizard.php
A includes/specials/UploadWizardSimpleForm.php
4 files changed, 25 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/36/406136/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 5595999..1b1f247 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0"?>
 <ruleset>
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
-               <exclude 
name="Generic.Files.OneObjectStructurePerFile.MultipleFound" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingParamComment" />
                <exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
                <exclude 
name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
diff --git a/extension.json b/extension.json
index 1dfeb69..8ac3610 100644
--- a/extension.json
+++ b/extension.json
@@ -98,7 +98,7 @@
                "SpecialCampaigns": "includes/specials/SpecialCampaigns.php",
                "ApiQueryAllCampaigns": "includes/ApiQueryAllCampaigns.php",
                "ApiFlickrBlacklist": "includes/ApiFlickrBlacklist.php",
-               "UploadWizardSimpleForm": 
"includes/specials/SpecialUploadWizard.php"
+               "UploadWizardSimpleForm": 
"includes/specials/UploadWizardSimpleForm.php"
        },
        "ResourceModules": {
                "ext.uploadWizard.formDataTransport": {
diff --git a/includes/specials/SpecialUploadWizard.php 
b/includes/specials/SpecialUploadWizard.php
index cc34855..7108d38 100644
--- a/includes/specials/SpecialUploadWizard.php
+++ b/includes/specials/SpecialUploadWizard.php
@@ -367,17 +367,3 @@
                return 'media';
        }
 }
-
-/**
- * This is a hack on UploadForm, to make one that works from UploadWizard when 
JS is not available.
- */
-class UploadWizardSimpleForm extends UploadForm {
-
-       /**
-        * Normally, UploadForm adds its own Javascript.
-        * We wish to prevent this, because we want to control the case where 
we have Javascript.
-        * So, we make the addUploadJS a no-op.
-        */
-       protected function addUploadJS() {
-       }
-}
diff --git a/includes/specials/UploadWizardSimpleForm.php 
b/includes/specials/UploadWizardSimpleForm.php
new file mode 100644
index 0000000..692c995
--- /dev/null
+++ b/includes/specials/UploadWizardSimpleForm.php
@@ -0,0 +1,24 @@
+<?php
+/**
+ * This upload form is used at Special:UploadWizard
+ *
+ * Special:UploadWizard is easy to use multi-file upload page.
+ *
+ * @file
+ * @ingroup SpecialPage
+ * @ingroup Upload
+ */
+
+/**
+ * This is a hack on UploadForm, to make one that works from UploadWizard when 
JS is not available.
+ */
+class UploadWizardSimpleForm extends UploadForm {
+
+       /**
+        * Normally, UploadForm adds its own Javascript.
+        * We wish to prevent this, because we want to control the case where 
we have Javascript.
+        * So, we make the addUploadJS a no-op.
+        */
+       protected function addUploadJS() {
+       }
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/406136
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3c9024ec5456a3fae17989b99d16f53b8c8165a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Phantom42 <nikita...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to