r70268 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70267‎ | r70268 | r70269 >
Date:09:09, 1 August 2010
Author:ialex
Status:ok
Tags:
Comment:
SpecialPage provides a getTitle() function, so use it
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -73,7 +73,7 @@
7474 return;
7575 }
7676
77 - $this->selfTitle = SpecialPage::getTitleFor( 'Whatlinkshere', $this->target->getPrefixedDBkey() );
 77+ $this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() );
7878
7979 $wgOut->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) );
8080 $wgOut->setSubtitle( wfMsg( 'whatlinkshere-backlink', $this->skin->link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
@@ -316,7 +316,7 @@
317317 protected function wlhLink( Title $target, $text ) {
318318 static $title = null;
319319 if ( $title === null )
320 - $title = SpecialPage::getTitleFor( 'Whatlinkshere' );
 320+ $title = $this->getTitle();
321321
322322 return $this->skin->linkKnown(
323323 $title,
@@ -381,7 +381,7 @@
382382 $f = Xml::openElement( 'form', array( 'action' => $wgScript ) );
383383
384384 # Values that should not be forgotten
385 - $f .= Xml::hidden( 'title', SpecialPage::getTitleFor( 'Whatlinkshere' )->getPrefixedText() );
 385+ $f .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() );
386386 foreach ( $this->opts->getUnconsumedValues() as $name => $value ) {
387387 $f .= Xml::hidden( $name, $value );
388388 }

Status & tagging log