r86252 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86251‎ | r86252 | r86253 >
Date:10:44, 17 April 2011
Author:happy-melon
Status:ok
Tags:
Comment:
Tidy up some more uses of SpecialPage static methods
Modified paths:
  • /trunk/phase3/includes/QueryPage.php (modified) (history)
  • /trunk/phase3/includes/SkinLegacy.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinLegacy.php
@@ -432,7 +432,7 @@
433433 function specialPagesList() {
434434 global $wgContLang, $wgServer, $wgRedirectScript;
435435
436 - $pages = array_merge( SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages() );
 436+ $pages = SpecialPage::getUsablePages();
437437
438438 foreach ( $pages as $name => $page ) {
439439 $pages[$name] = $page->getDescription();
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -400,8 +400,7 @@
401401
402402 protected function feedTitle() {
403403 global $wgLanguageCode, $wgSitename;
404 - $page = SpecialPage::getPage( 'Newpages' );
405 - $desc = $page->getDescription();
 404+ $desc = $this->getDescription();
406405 return "$wgSitename - $desc [$wgLanguageCode]";
407406 }
408407
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -450,8 +450,7 @@
451451
452452 protected function feedTitle() {
453453 global $wgLanguageCode, $wgSitename;
454 - $page = SpecialPage::getPage( 'Contributions' );
455 - $desc = $page->getDescription();
 454+ $desc = $this->getDescription();
456455 return "$wgSitename - $desc [$wgLanguageCode]";
457456 }
458457
Index: trunk/phase3/includes/QueryPage.php
@@ -687,8 +687,7 @@
688688
689689 function feedTitle() {
690690 global $wgLanguageCode, $wgSitename;
691 - $page = SpecialPage::getPage( $this->getName() );
692 - $desc = $page->getDescription();
 691+ $desc = $this->getDescription();
693692 return "$wgSitename - $desc [$wgLanguageCode]";
694693 }
695694
@@ -697,8 +696,7 @@
698697 }
699698
700699 function feedUrl() {
701 - $title = SpecialPage::getTitleFor( $this->getName() );
702 - return $title->getFullURL();
 700+ return $this->getTitle()->getFullURL();
703701 }
704702 }
705703

Status & tagging log