Index: trunk/extensions/QrCode/QrCode.php |
— | — | @@ -56,17 +56,15 @@ |
57 | 57 | * to OOP patterns. |
58 | 58 | */ |
59 | 59 | function newQrCode() { |
60 | | - global $wgTitle; |
| 60 | + $params = func_get_args(); |
| 61 | + $parser = array_shift($params); // drop the parser |
61 | 62 | |
62 | 63 | // we're not generating QrCodes for pages in the "Special" namespace |
63 | 64 | // 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 ) { |
65 | 66 | return false; |
66 | 67 | } |
67 | 68 | |
68 | | - $params = func_get_args(); |
69 | | - $parser = array_shift($params); // drop the parser |
70 | | - |
71 | 69 | foreach( $params as $pair ) { |
72 | 70 | $rpms = explode( '=', $pair ); |
73 | 71 | if( $rpms[0] == 'ecc' ) $ecc = $rpms[1]; |