Phantom42 has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/405551 )
Change subject: Fix multiple PHP class declarations in one file in
includes/specialse
......................................................................
Fix multiple PHP class declarations in one file in includes/specialse
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: I8ef71fc02404e9006c6d0c68d21b002a347d6f37
---
M autoload.php
A includes/specials/SpecialAllMyUploads.php
A includes/specials/SpecialListAdmins.php
A includes/specials/SpecialListBots.php
M includes/specials/SpecialListusers.php
M includes/specials/SpecialMyRedirectPages.php
A includes/specials/SpecialMycontributions.php
A includes/specials/SpecialMytalk.php
A includes/specials/SpecialMyuploads.php
M includes/specials/SpecialUploadStash.php
A includes/specials/SpecialUploadStashTooLargeException.php
11 files changed, 337 insertions(+), 164 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/51/405551/1
diff --git a/autoload.php b/autoload.php
index 9e557e1..b493cb0 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1373,7 +1373,7 @@
'SlideshowImageGallery' => __DIR__ .
'/includes/gallery/SlideshowImageGallery.php',
'SpecialActiveUsers' => __DIR__ .
'/includes/specials/SpecialActiveusers.php',
'SpecialAllMessages' => __DIR__ .
'/includes/specials/SpecialAllMessages.php',
- 'SpecialAllMyUploads' => __DIR__ .
'/includes/specials/SpecialMyRedirectPages.php',
+ 'SpecialAllMyUploads' => __DIR__ .
'/includes/specials/SpecialAllMyUploads.php',
'SpecialAllPages' => __DIR__ . '/includes/specials/SpecialAllPages.php',
'SpecialApiHelp' => __DIR__ . '/includes/specials/SpecialApiHelp.php',
'SpecialApiSandbox' => __DIR__ .
'/includes/specials/SpecialApiSandbox.php',
@@ -1403,20 +1403,20 @@
'SpecialImport' => __DIR__ . '/includes/specials/SpecialImport.php',
'SpecialJavaScriptTest' => __DIR__ .
'/includes/specials/SpecialJavaScriptTest.php',
'SpecialLinkAccounts' => __DIR__ .
'/includes/specials/SpecialLinkAccounts.php',
- 'SpecialListAdmins' => __DIR__ .
'/includes/specials/SpecialListusers.php',
- 'SpecialListBots' => __DIR__ .
'/includes/specials/SpecialListusers.php',
+ 'SpecialListAdmins' => __DIR__ .
'/includes/specials/SpecialListAdmins.php',
+ 'SpecialListBots' => __DIR__ . '/includes/specials/SpecialListBots.php',
'SpecialListFiles' => __DIR__ .
'/includes/specials/SpecialListfiles.php',
'SpecialListGrants' => __DIR__ .
'/includes/specials/SpecialListgrants.php',
'SpecialListGroupRights' => __DIR__ .
'/includes/specials/SpecialListgrouprights.php',
- 'SpecialListUsers' => __DIR__ .
'/includes/specials/SpecialListusers.php',
+ 'SpecialListUsers' => __DIR__ .
'/includes/specials/SpecialListUsers.php',
'SpecialLockdb' => __DIR__ . '/includes/specials/SpecialLockdb.php',
'SpecialLog' => __DIR__ . '/includes/specials/SpecialLog.php',
'SpecialMergeHistory' => __DIR__ .
'/includes/specials/SpecialMergeHistory.php',
'SpecialMyLanguage' => __DIR__ .
'/includes/specials/SpecialMyLanguage.php',
- 'SpecialMycontributions' => __DIR__ .
'/includes/specials/SpecialMyRedirectPages.php',
+ 'SpecialMycontributions' => __DIR__ .
'/includes/specials/SpecialMycontributions.php',
'SpecialMypage' => __DIR__ .
'/includes/specials/SpecialMyRedirectPages.php',
- 'SpecialMytalk' => __DIR__ .
'/includes/specials/SpecialMyRedirectPages.php',
- 'SpecialMyuploads' => __DIR__ .
'/includes/specials/SpecialMyRedirectPages.php',
+ 'SpecialMytalk' => __DIR__ . '/includes/specials/SpecialMytalk.php',
+ 'SpecialMyuploads' => __DIR__ .
'/includes/specials/SpecialMyuploads.php',
'SpecialNewFiles' => __DIR__ .
'/includes/specials/SpecialNewimages.php',
'SpecialNewpages' => __DIR__ . '/includes/specials/SpecialNewpages.php',
'SpecialPage' => __DIR__ . '/includes/specialpage/SpecialPage.php',
@@ -1453,7 +1453,7 @@
'SpecialUnlockdb' => __DIR__ . '/includes/specials/SpecialUnlockdb.php',
'SpecialUpload' => __DIR__ . '/includes/specials/SpecialUpload.php',
'SpecialUploadStash' => __DIR__ .
'/includes/specials/SpecialUploadStash.php',
- 'SpecialUploadStashTooLargeException' => __DIR__ .
'/includes/specials/SpecialUploadStash.php',
+ 'SpecialUploadStashTooLargeException' => __DIR__ .
'/includes/specials/SpecialUploadStashTooLargeException.php',
'SpecialUserLogin' => __DIR__ .
'/includes/specials/SpecialUserLogin.php',
'SpecialUserLogout' => __DIR__ .
'/includes/specials/SpecialUserLogout.php',
'SpecialVersion' => __DIR__ . '/includes/specials/SpecialVersion.php',
diff --git a/includes/specials/SpecialAllMyUploads.php
b/includes/specials/SpecialAllMyUploads.php
new file mode 100644
index 0000000..605b61c
--- /dev/null
+++ b/includes/specials/SpecialAllMyUploads.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Special pages that are used to get user independent links pointing to
+ * current user's pages (user page, talk page, contributions, etc.).
+ * This can let us cache a single copy of some generated content for all
+ * users or be linked in wikitext help pages.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Special page pointing to current user's uploaded files (including old
versions).
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialAllMyUploads extends RedirectSpecialPage {
+ public function __construct() {
+ parent::__construct( 'AllMyUploads' );
+ $this->mAllowedRedirectParams = [ 'limit', 'ilsearch' ];
+ }
+
+ /**
+ * @param string|null $subpage
+ * @return Title
+ */
+ public function getRedirect( $subpage ) {
+ $this->mAddedRedirectParams['ilshowall'] = 1;
+
+ return SpecialPage::getTitleFor( 'Listfiles',
$this->getUser()->getName() );
+ }
+
+ /**
+ * Target identifies a specific User. See T109724.
+ *
+ * @since 1.27
+ * @return bool
+ */
+ public function personallyIdentifiableTarget() {
+ return true;
+ }
+}
diff --git a/includes/specials/SpecialListAdmins.php
b/includes/specials/SpecialListAdmins.php
new file mode 100644
index 0000000..8dcd3e2
--- /dev/null
+++ b/includes/specials/SpecialListAdmins.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Redirect page: Special:ListAdmins --> Special:ListUsers/sysop.
+ *
+ * Copyright © 2004 Brion Vibber, lcrocker, Tim Starling,
+ * Domas Mituzas, Antoine Musso, Jens Frank, Zhengzhu,
+ * 2006 Rob Church <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Redirect page: Special:ListAdmins --> Special:ListUsers/sysop.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialListAdmins extends SpecialRedirectToSpecial {
+ function __construct() {
+ parent::__construct( 'Listadmins', 'Listusers', 'sysop' );
+ }
+}
diff --git a/includes/specials/SpecialListBots.php
b/includes/specials/SpecialListBots.php
new file mode 100644
index 0000000..0c40a6a
--- /dev/null
+++ b/includes/specials/SpecialListBots.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Redirect page: Special:ListBots --> Special:ListUsers/bot.
+ *
+ * Copyright © 2004 Brion Vibber, lcrocker, Tim Starling,
+ * Domas Mituzas, Antoine Musso, Jens Frank, Zhengzhu,
+ * 2006 Rob Church <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Redirect page: Special:ListBots --> Special:ListUsers/bot.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialListBots extends SpecialRedirectToSpecial {
+ function __construct() {
+ parent::__construct( 'Listbots', 'Listusers', 'bot' );
+ }
+}
diff --git a/includes/specials/SpecialListusers.php
b/includes/specials/SpecialListusers.php
index dee2968..2c35815 100644
--- a/includes/specials/SpecialListusers.php
+++ b/includes/specials/SpecialListusers.php
@@ -77,25 +77,3 @@
return 'users';
}
}
-
-/**
- * Redirect page: Special:ListAdmins --> Special:ListUsers/sysop.
- *
- * @ingroup SpecialPage
- */
-class SpecialListAdmins extends SpecialRedirectToSpecial {
- function __construct() {
- parent::__construct( 'Listadmins', 'Listusers', 'sysop' );
- }
-}
-
-/**
- * Redirect page: Special:ListBots --> Special:ListUsers/bot.
- *
- * @ingroup SpecialPage
- */
-class SpecialListBots extends SpecialRedirectToSpecial {
- function __construct() {
- parent::__construct( 'Listbots', 'Listusers', 'bot' );
- }
-}
diff --git a/includes/specials/SpecialMyRedirectPages.php
b/includes/specials/SpecialMyRedirectPages.php
index 4521a53..487fc74 100644
--- a/includes/specials/SpecialMyRedirectPages.php
+++ b/includes/specials/SpecialMyRedirectPages.php
@@ -56,130 +56,3 @@
return true;
}
}
-
-/**
- * Special page pointing to current user's talk page.
- *
- * @ingroup SpecialPage
- */
-class SpecialMytalk extends RedirectSpecialArticle {
- public function __construct() {
- parent::__construct( 'Mytalk' );
- }
-
- /**
- * @param string|null $subpage
- * @return Title
- */
- public function getRedirect( $subpage ) {
- if ( $subpage === null || $subpage === '' ) {
- return Title::makeTitle( NS_USER_TALK,
$this->getUser()->getName() );
- }
-
- return Title::makeTitle( NS_USER_TALK,
$this->getUser()->getName() . '/' . $subpage );
- }
-
- /**
- * Target identifies a specific User. See T109724.
- *
- * @since 1.27
- * @return bool
- */
- public function personallyIdentifiableTarget() {
- return true;
- }
-}
-
-/**
- * Special page pointing to current user's contributions.
- *
- * @ingroup SpecialPage
- */
-class SpecialMycontributions extends RedirectSpecialPage {
- public function __construct() {
- parent::__construct( 'Mycontributions' );
- $this->mAllowedRedirectParams = [ 'limit', 'namespace',
'tagfilter',
- 'offset', 'dir', 'year', 'month', 'feed', 'deletedOnly',
- 'nsInvert', 'associated', 'newOnly', 'topOnly' ];
- }
-
- /**
- * @param string|null $subpage
- * @return Title
- */
- public function getRedirect( $subpage ) {
- return SpecialPage::getTitleFor( 'Contributions',
$this->getUser()->getName() );
- }
-
- /**
- * Target identifies a specific User. See T109724.
- *
- * @since 1.27
- * @return bool
- */
- public function personallyIdentifiableTarget() {
- return true;
- }
-}
-
-/**
- * Special page pointing to current user's uploaded files.
- *
- * @ingroup SpecialPage
- */
-class SpecialMyuploads extends RedirectSpecialPage {
- public function __construct() {
- parent::__construct( 'Myuploads' );
- $this->mAllowedRedirectParams = [ 'limit', 'ilshowall',
'ilsearch' ];
- }
-
- /**
- * @param string|null $subpage
- * @return Title
- */
- public function getRedirect( $subpage ) {
- return SpecialPage::getTitleFor( 'Listfiles',
$this->getUser()->getName() );
- }
-
- /**
- * Target identifies a specific User. See T109724.
- *
- * @since 1.27
- * @return bool
- */
- public function personallyIdentifiableTarget() {
- return true;
- }
-}
-
-/**
- * Special page pointing to current user's uploaded files (including old
versions).
- *
- * @ingroup SpecialPage
- */
-class SpecialAllMyUploads extends RedirectSpecialPage {
- public function __construct() {
- parent::__construct( 'AllMyUploads' );
- $this->mAllowedRedirectParams = [ 'limit', 'ilsearch' ];
- }
-
- /**
- * @param string|null $subpage
- * @return Title
- */
- public function getRedirect( $subpage ) {
- $this->mAddedRedirectParams['ilshowall'] = 1;
-
- return SpecialPage::getTitleFor( 'Listfiles',
$this->getUser()->getName() );
- }
-
- /**
- * Target identifies a specific User. See T109724.
- *
- * @since 1.27
- * @return bool
- */
- public function personallyIdentifiableTarget() {
- return true;
- }
-}
diff --git a/includes/specials/SpecialMycontributions.php
b/includes/specials/SpecialMycontributions.php
new file mode 100644
index 0000000..1fc0f90
--- /dev/null
+++ b/includes/specials/SpecialMycontributions.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * Special pages that are used to get user independent links pointing to
+ * current user's pages (user page, talk page, contributions, etc.).
+ * This can let us cache a single copy of some generated content for all
+ * users or be linked in wikitext help pages.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Special page pointing to current user's contributions.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialMycontributions extends RedirectSpecialPage {
+ public function __construct() {
+ parent::__construct( 'Mycontributions' );
+ $this->mAllowedRedirectParams = [ 'limit', 'namespace',
'tagfilter',
+ 'offset', 'dir', 'year', 'month', 'feed', 'deletedOnly',
+ 'nsInvert', 'associated', 'newOnly', 'topOnly' ];
+ }
+
+ /**
+ * @param string|null $subpage
+ * @return Title
+ */
+ public function getRedirect( $subpage ) {
+ return SpecialPage::getTitleFor( 'Contributions',
$this->getUser()->getName() );
+ }
+
+ /**
+ * Target identifies a specific User. See T109724.
+ *
+ * @since 1.27
+ * @return bool
+ */
+ public function personallyIdentifiableTarget() {
+ return true;
+ }
+}
diff --git a/includes/specials/SpecialMytalk.php
b/includes/specials/SpecialMytalk.php
new file mode 100644
index 0000000..d7be71f
--- /dev/null
+++ b/includes/specials/SpecialMytalk.php
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Special pages that are used to get user independent links pointing to
+ * current user's pages (user page, talk page, contributions, etc.).
+ * This can let us cache a single copy of some generated content for all
+ * users or be linked in wikitext help pages.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Special page pointing to current user's talk page.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialMytalk extends RedirectSpecialArticle {
+ public function __construct() {
+ parent::__construct( 'Mytalk' );
+ }
+
+ /**
+ * @param string|null $subpage
+ * @return Title
+ */
+ public function getRedirect( $subpage ) {
+ if ( $subpage === null || $subpage === '' ) {
+ return Title::makeTitle( NS_USER_TALK,
$this->getUser()->getName() );
+ }
+
+ return Title::makeTitle( NS_USER_TALK,
$this->getUser()->getName() . '/' . $subpage );
+ }
+
+ /**
+ * Target identifies a specific User. See T109724.
+ *
+ * @since 1.27
+ * @return bool
+ */
+ public function personallyIdentifiableTarget() {
+ return true;
+ }
+}
diff --git a/includes/specials/SpecialMyuploads.php
b/includes/specials/SpecialMyuploads.php
new file mode 100644
index 0000000..1028ef1
--- /dev/null
+++ b/includes/specials/SpecialMyuploads.php
@@ -0,0 +1,55 @@
+<?php
+/**
+ * Special pages that are used to get user independent links pointing to
+ * current user's pages (user page, talk page, contributions, etc.).
+ * This can let us cache a single copy of some generated content for all
+ * users or be linked in wikitext help pages.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+/**
+ * Special page pointing to current user's uploaded files.
+ *
+ * @ingroup SpecialPage
+ */
+class SpecialMyuploads extends RedirectSpecialPage {
+ public function __construct() {
+ parent::__construct( 'Myuploads' );
+ $this->mAllowedRedirectParams = [ 'limit', 'ilshowall',
'ilsearch' ];
+ }
+
+ /**
+ * @param string|null $subpage
+ * @return Title
+ */
+ public function getRedirect( $subpage ) {
+ return SpecialPage::getTitleFor( 'Listfiles',
$this->getUser()->getName() );
+ }
+
+ /**
+ * Target identifies a specific User. See T109724.
+ *
+ * @since 1.27
+ * @return bool
+ */
+ public function personallyIdentifiableTarget() {
+ return true;
+ }
+}
diff --git a/includes/specials/SpecialUploadStash.php
b/includes/specials/SpecialUploadStash.php
index c8b1578..f0c0daa 100644
--- a/includes/specials/SpecialUploadStash.php
+++ b/includes/specials/SpecialUploadStash.php
@@ -447,10 +447,3 @@
return true;
}
}
-
-/**
- * @ingroup SpecialPage
- * @ingroup Upload
- */
-class SpecialUploadStashTooLargeException extends UploadStashException {
-}
diff --git a/includes/specials/SpecialUploadStashTooLargeException.php
b/includes/specials/SpecialUploadStashTooLargeException.php
new file mode 100644
index 0000000..ef9f2c4
--- /dev/null
+++ b/includes/specials/SpecialUploadStashTooLargeException.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * This exception is used for Special:UploadStash.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup SpecialPage
+ * @ingroup Upload
+ */
+class SpecialUploadStashTooLargeException extends UploadStashException {
+}
--
To view, visit https://gerrit.wikimedia.org/r/405551
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8ef71fc02404e9006c6d0c68d21b002a347d6f37
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