Index: branches/pageoutput/includes/specials/SpecialHistory.php |
— | — | @@ -28,10 +28,6 @@ |
29 | 29 | */ |
30 | 30 | class SpecialHistory extends UnlistedSpecialPage implements SpecialTitleTarget { // XXX: Should this be listed or unlisted? |
31 | 31 | |
32 | | - function __construct() { |
33 | | - parent::__construct( 'History' ); |
34 | | - } |
35 | | - |
36 | 32 | function executeWithTarget() { |
37 | 33 | $context = new DerivativeContext( $this->getContext() ); |
38 | 34 | $context->setTitle( $this->target() ); |
Index: branches/pageoutput/includes/SpecialPage.php |
— | — | @@ -344,6 +344,9 @@ |
345 | 345 | * @param $includable Bool: whether the page can be included in normal pages |
346 | 346 | */ |
347 | 347 | private function init( $name, $restriction, $listed, $function, $file, $includable ) { |
| 348 | + if ( $name == '' && preg_match( '/^Special[_A-Za-z0-9]+$/', get_class( $this ) ) ) { |
| 349 | + $name = preg_replace( '/^Special/', '', get_class( $this ) ); |
| 350 | + } |
348 | 351 | $this->mName = $name; |
349 | 352 | $this->mRestriction = $restriction; |
350 | 353 | $this->mListed = $listed; |
— | — | @@ -921,7 +924,7 @@ |
922 | 925 | * @ingroup SpecialPage |
923 | 926 | */ |
924 | 927 | class UnlistedSpecialPage extends SpecialPage { |
925 | | - function __construct( $name, $restriction = '', $function = false, $file = 'default' ) { |
| 928 | + function __construct( $name = '', $restriction = '', $function = false, $file = 'default' ) { |
926 | 929 | parent::__construct( $name, $restriction, false, $function, $file ); |
927 | 930 | } |
928 | 931 | |
— | — | @@ -936,7 +939,7 @@ |
937 | 940 | */ |
938 | 941 | class IncludableSpecialPage extends SpecialPage { |
939 | 942 | function __construct( |
940 | | - $name, $restriction = '', $listed = true, $function = false, $file = 'default' |
| 943 | + $name = '', $restriction = '', $listed = true, $function = false, $file = 'default' |
941 | 944 | ) { |
942 | 945 | parent::__construct( $name, $restriction, $listed, $function, $file, true ); |
943 | 946 | } |