r71100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71099‎ | r71100 | r71101 >
Date:07:25, 15 August 2010
Author:ialex
Status:reverted
Tags:
Comment:
* SpecialPage::getTitleFor() is a static method; use SpecialPage::getTitle() which is dynamic and doesn't require page's name
* wfMsg() -> wfMsgHtml() for the text passed to Linker::link() since it won't be escaped by the latter method
Modified paths:
  • /trunk/extensions/MWReleases/ui/SpecialReleaseManager.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MWReleases/ui/SpecialReleaseManager.php
@@ -56,8 +56,8 @@
5757 $this->out->addWikiMsg( 'releasemanager-header' );
5858 $h = Html::openElement( 'div', array( 'style' => 'text-align:center' ) ) .
5959 $this->skin->link(
60 - $this->getTitleFor( 'ReleaseManager', 'add' ),
61 - wfMsg( 'releasemanager-add' ),
 60+ $this->getTitle( 'add' ),
 61+ wfMsgHtml( 'releasemanager-add' ),
6262 array( 'style' => 'font-size:175%' )
6363 ) . Html::element( 'hr' ) . Html::closeElement( 'div' ) .
6464 Html::openElement( 'table', array( 'class' => 'wikitable plainlinks sortable' ) ) .
@@ -86,11 +86,11 @@
8787 wfMsg( 'releasemanager-supported-overriden', $supported ) :
8888 wfMsg( 'releasemanager-supported-til-eol', $supported );
8989 $editDel = $this->skin->link(
90 - $this->getTitleFor( 'ReleaseManager', 'edit/' . $rel->getId() ),
91 - wfMsg( 'edit' )
 90+ $this->getTitle( 'edit/' . $rel->getId() ),
 91+ wfMsgHtml( 'edit' )
9292 ) . ' / ' . $this->skin->link(
93 - $this->getTitleFor( 'ReleaseManager', 'delete/' . $rel->getId() ),
94 - wfMsg( 'delete' )
 93+ $this->getTitle( 'delete/' . $rel->getId() ),
 94+ wfMsgHtml( 'delete' )
9595 );
9696 return Html::openElement( 'tr' ) .
9797 Html::element( 'td', array(), $rel->getName() ) .
@@ -123,7 +123,7 @@
124124 $this->out->addWikiMsg( 'releasemanager-doesnotexist' );
125125 return;
126126 } else {
127 - $submitUrl = $this->getTitleFor( 'ReleaseManager', "delete/$versionId" )->getFullURL();
 127+ $submitUrl = $this->getTitle( "delete/$versionId" )->getFullURL();
128128 $this->out->addWikiMsg( 'releasemanager-delete-confirm' );
129129 $h = Html::openElement( 'form', array( 'action' => $submitUrl,
130130 'method' => 'post' ) ) .

Status & tagging log