Index: trunk/extensions/QrCode/QrCode.php |
— | — | @@ -5,6 +5,7 @@ |
6 | 6 | * @license: LGPL (GNU Lesser General Public License) http://www.gnu.org/licenses/lgpl.html |
7 | 7 | * |
8 | 8 | * @file QrCode.php |
| 9 | + * @ingroup QrCode |
9 | 10 | * |
10 | 11 | * @author David Raison |
11 | 12 | * |
— | — | @@ -55,6 +56,14 @@ |
56 | 57 | * to OOP patterns. |
57 | 58 | */ |
58 | 59 | 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 | + |
59 | 68 | $params = func_get_args(); |
60 | 69 | $parser = array_shift($params); // drop the parser |
61 | 70 | |