Separated base classes for special pages (most of them abstract) and several actual special pages, which were previously both in the same file. Added license headings, @ingroup SpecialPage and updated class doc comments; no other changes. Most classes are now in separate files (the list of changes can be seen by diffing AutoLoader.php), with three exceptions: * SpecialListAdmins and SpecialListBots (redirects to Special:ListUsers with a parameter) joined their friend in includes/specials/SpecialListusers.php. * SpecialMycontributions, SpecialMypage, SpecialMytalk, SpecialMyuploads and SpecialAllMyUploads were moved into a new file includes/specials/SpecialMyRedirectPages.php – each of them is literally ten lines of code and any changes are likely to touch them all, separate files seem impractical. * RedirectSpecialArticle and SpecialRedirectToSpecial are in one file with their parent class RedirectSpecialPage (on a side note, I filed bug 58215 to rename them to something less silly). Change-Id: Ida87238401b182924dbe169a6278588bc2fbecfd
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Shortcut to construct a special page which is unlisted by default.
|
|
*
|
|
* 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
|
|
*/
|
|
|
|
/**
|
|
* Shortcut to construct a special page which is unlisted by default.
|
|
*
|
|
* @ingroup SpecialPage
|
|
*/
|
|
class UnlistedSpecialPage extends SpecialPage {
|
|
function __construct( $name, $restriction = '', $function = false, $file = 'default' ) {
|
|
parent::__construct( $name, $restriction, false, $function, $file );
|
|
}
|
|
|
|
public function isListed() {
|
|
return false;
|
|
}
|
|
}
|