r73654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73653‎ | r73654 | r73655 >
Date:14:11, 24 September 2010
Author:demon
Status:deferred
Tags:
Comment:
Drop ugly $wgTitle
Modified paths:
  • /trunk/extensions/QrCode/QrCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/QrCode/QrCode.php
@@ -56,17 +56,15 @@
5757 * to OOP patterns.
5858 */
5959 function newQrCode() {
60 - global $wgTitle;
 60+ $params = func_get_args();
 61+ $parser = array_shift($params); // drop the parser
6162
6263 // we're not generating QrCodes for pages in the "Special" namespace
6364 // as that can lead to multiple "uploads" on i.e. Special:Ask
64 - if ( $wgTitle->getNamespace() === NS_SPECIAL ) {
 65+ if ( $parser->getTitle()->getNamespace() === NS_SPECIAL ) {
6566 return false;
6667 }
6768
68 - $params = func_get_args();
69 - $parser = array_shift($params); // drop the parser
70 -
7169 foreach( $params as $pair ) {
7270 $rpms = explode( '=', $pair );
7371 if( $rpms[0] == 'ecc' ) $ecc = $rpms[1];

Status & tagging log