r82074 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82073‎ | r82074 | r82075 >
Date:20:28, 13 February 2011
Author:ialex
Status:ok
Tags:
Comment:
Use $this->getTitle() instead of $wgTitle
Modified paths:
  • /trunk/extensions/ConfigureWMF/ConfigureWMF.page.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfigureWMF/ConfigureWMF.page.php
@@ -56,7 +56,7 @@
5757 }
5858
5959 function showSiteSelectForm( $invalid = false ) {
60 - global $wgOut, $wgScript, $wgTitle;
 60+ global $wgOut, $wgScript;
6161 $legend = wfMsgHtml( 'configurewmf-selectsite' );
6262 $wgOut->addHTML( "<fieldset><legend>{$legend}</legend>" );
6363 if( $invalid ) {
@@ -65,7 +65,7 @@
6666 $wgOut->addHTML( '<strong id="cfgwmf-attention" style="color: red; font-size: 12pt">' . wfMsgHTML( 'configurewmf-attentionnotice' ) . '</strong>' );
6767 $wgOut->addWikiMsg( 'configurewmf-selectsite-help' );
6868 $wgOut->addHTML( "<form action='{$wgScript}' method='get'>" );
69 - $wgOut->addHTML( '<p>' . Xml::hidden( 'title', $wgTitle->getFullText() ) . '</p><table><tr>' );
 69+ $wgOut->addHTML( '<p>' . Xml::hidden( 'title', $this->getTitle()->getFullText() ) . '</p><table><tr>' );
7070 $wgOut->addHTML( '<td class="mw-label">' . Xml::label( wfMsg( 'configurewmf-site' ), 'cfg-site' ) . '</td>' );
7171 $wgOut->addHTML( '<td class="mw-input">' . Xml::input( 'wiki', false, false, array( 'id' => 'cfg-site' ) ) . '</td>' );
7272 $wgOut->addHTML( '</tr><tr><td></td><td class="mw-input">' . Xml::submitButton( wfMsg( 'configurewmf-select' ) ) . '</td>' );
@@ -73,7 +73,7 @@
7474 }
7575
7676 function showSettingsChoiceForm( $wiki, $success = false ) {
77 - global $wgOut, $wgTitle;
 77+ global $wgOut;
7878 $this->addNav( 1, $wiki );
7979 $legend = wfMsgHtml( 'configurewmf-chooseconfig' );
8080 $wgOut->addHTML( "<fieldset><legend>{$legend}</legend>" );
@@ -84,7 +84,7 @@
8585 $wgOut->addHTML( '<ul>' );
8686 foreach( ConfigureWMF::$settings as $name => $value ) {
8787 $descr = wfMsgHtml( "configurewmf-cfgname-{$name}" );
88 - $url = htmlspecialchars( $wgTitle->getLocalURL( "wiki={$wiki}&config={$name}" ) );
 88+ $url = htmlspecialchars( $this->getTitle()->getLocalURL( "wiki={$wiki}&config={$name}" ) );
8989 $wgOut->addHTML( "<li><a href='{$url}'>{$descr}</a></li>" );
9090 }
9191 $wgOut->addHTML( '</ul></fieldset>' );
@@ -122,7 +122,7 @@
123123 }
124124
125125 function showChangeSettingsForm( $wiki, $config ) {
126 - global $wgOut, $wgTitle, $wgScript, $wgUser, $wgRequest;
 126+ global $wgOut, $wgScript, $wgUser, $wgRequest;
127127 $legend = wfMsgHtml( 'configurewmf-change' );
128128 $submit = wfMsg( 'configurewmf-submit' );
129129 $reason = wfMsg( 'configurewmf-reason' );
@@ -144,7 +144,7 @@
145145 $wgOut->addHTML( wfMsgWikiHtml( 'configurewmf-seealso', $vars ) );
146146 $wgOut->addHTML( "<hr/>" );
147147 $wgOut->addHTML( "<form action='{$wgScript}' method='post'><p>" );
148 - $wgOut->addHTML( Xml::hidden( 'title', $wgTitle->getFullText() ) );
 148+ $wgOut->addHTML( Xml::hidden( 'title', $this->getTitle()->getFullText() ) );
149149 $wgOut->addHTML( Xml::hidden( 'wiki', $wiki ) );
150150 $wgOut->addHTML( Xml::hidden( 'config', $config ) );
151151 $wgOut->addHTML( Xml::hidden( 'edittoken', $wgUser->editToken() ) );
@@ -313,7 +313,7 @@
314314 }
315315
316316 function addNav( $levels = 0, $wiki = '', $config = '', $group = '' ) {
317 - global $wgUser, $wgTitle, $wgOut;
 317+ global $wgUser, $wgOut;
318318 $skin = $wgUser->getSkin();
319319 $bits = array();
320320 $bits[] = array( '', wfMsg( 'configurewmf-nav-rootpage' ) );
@@ -331,7 +331,7 @@
332332 if( $i == count( $bits ) - 1 )
333333 $bits[$i] = $bits[$i][1];
334334 else
335 - $bits[$i] = $skin->makeLinkObj( $wgTitle, $bits[$i][1], $bits[$i][0] );
 335+ $bits[$i] = $skin->makeLinkObj( $this->getTitle(), $bits[$i][1], $bits[$i][0] );
336336 $wgOut->setSubtitle( '<div id="contentSub"><span class="subpages">&lt; ' .
337337 implode( '&#160;|&#160;', $bits ) . '</span></div>' );
338338 }

Status & tagging log