r82266 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82265‎ | r82266 | r82267 >
Date:17:48, 16 February 2011
Author:ialex
Status:ok
Tags:
Comment:
use Parser::getTitle() instead of $wgTitle
Modified paths:
  • /trunk/extensions/CommunityVoice/Modules/Ratings.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CommunityVoice/Modules/Ratings.php
@@ -140,7 +140,7 @@
141141 $args,
142142 $parser
143143 ) {
144 - global $wgUser, $wgTitle, $wgLang;
 144+ global $wgUser, $wgLang;
145145 global $egCommunityVoiceResourcesPath;
146146 // Disable caching
147147 $parser->disableCache();
@@ -194,6 +194,9 @@
195195 // Adds content of tag as parsed wiki-text
196196 $htmlOut .= $parser->recursiveTagParse( $input );
197197 }
 198+
 199+ $title = $parser->getTitle();
 200+
198201 // Checks if...
199202 if (
200203 // User has not voted yet
@@ -232,7 +235,7 @@
233236 )
234237 )
235238 ),
236 - CsJs::toScalar( $wgTitle->getPrefixedText() )
 239+ CsJs::toScalar( $title->getPrefixedText() )
237240 )
238241 )
239242 )
@@ -256,7 +259,7 @@
257260 'token' => $wgUser->editToken(),
258261 'module' => 'Ratings',
259262 'action' => 'ScaleVoteSubmission',
260 - 'scale[article]' => $wgTitle->getPrefixedText(),
 263+ 'scale[article]' => $title->getPrefixedText(),
261264 'scale[category]' => $args['category'],
262265 'scale[title]' => $args['title'],
263266 );

Status & tagging log