r73582 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73581‎ | r73582 | r73583 >
Date:23:20, 22 September 2010
Author:kwisatz
Status:deferred
Tags:
Comment:
fixed bug in QrCode where QrCode would be generated repeatedly for special pages
Modified paths:
  • /trunk/extensions/QrCode/QrCode.php (modified) (history)

Diff [purge]

Index: trunk/extensions/QrCode/QrCode.php
@@ -5,6 +5,7 @@
66 * @license: LGPL (GNU Lesser General Public License) http://www.gnu.org/licenses/lgpl.html
77 *
88 * @file QrCode.php
 9+ * @ingroup QrCode
910 *
1011 * @author David Raison
1112 *
@@ -55,6 +56,14 @@
5657 * to OOP patterns.
5758 */
5859 function newQrCode() {
 60+ global $wgTitle;
 61+
 62+ // we're not generating QrCodes for pages in the "Special" namespace
 63+ // as that can lead to multiple "uploads" on i.e. Special:Ask
 64+ if ( $wgTitle->getNamespace() === -1 ) {
 65+ return false;
 66+ }
 67+
5968 $params = func_get_args();
6069 $parser = array_shift($params); // drop the parser
6170

Status & tagging log