r69488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69487‎ | r69488 | r69489 >
Date:19:04, 17 July 2010
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Make includable special pages extend IncludableSpecialPage so that it's easier to see the ones that are includable
Modified paths:
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -25,8 +25,7 @@
2626 var $rclTargetTitle;
2727
2828 function __construct(){
29 - SpecialPage::SpecialPage( 'Recentchangeslinked' );
30 - $this->includable( true );
 29+ parent::__construct( 'Recentchangeslinked' );
3130 }
3231
3332 public function getDefaultOptions() {
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -21,7 +21,7 @@
2222 * implements Special:Newpages
2323 * @ingroup SpecialPage
2424 */
25 -class SpecialNewpages extends SpecialPage {
 25+class SpecialNewpages extends IncludableSpecialPage {
2626
2727 // Stored objects
2828 protected $opts, $skin;
@@ -31,7 +31,6 @@
3232
3333 public function __construct() {
3434 parent::__construct( 'Newpages' );
35 - $this->includable( true );
3635 }
3736
3837 protected function setup( $par ) {
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -21,12 +21,11 @@
2222 * Implements Special:Recentchanges
2323 * @ingroup SpecialPage
2424 */
25 -class SpecialRecentChanges extends SpecialPage {
 25+class SpecialRecentChanges extends IncludableSpecialPage {
2626 var $rcOptions, $rcSubpage;
2727
28 - public function __construct() {
29 - parent::__construct( 'Recentchanges' );
30 - $this->includable( true );
 28+ public function __construct( $name = 'Recentchanges' ) {
 29+ parent::__construct( $name );
3130 }
3231
3332 /**

Comments

#Comment by Aaron Schulz (talk | contribs)   23:27, 17 July 2010

Some extensions also use $this->includable()

Status & tagging log