From 3bb7cd6440b20dba9bd13e30ef641756a3cc57a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Tisza?= Date: Mon, 16 Nov 2015 00:39:08 -0800 Subject: [PATCH] Fix QR code generation module dependency Bug: T118511 Change-Id: Idf11e9a469f9e9faa342d82843cf06f7e47406c6 --- special/SpecialOATH.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/special/SpecialOATH.php b/special/SpecialOATH.php index 96c3d6c2..8361629f 100644 --- a/special/SpecialOATH.php +++ b/special/SpecialOATH.php @@ -116,9 +116,16 @@ class SpecialOATH extends UnlistedSpecialPage { . '
'; $this->getOutput()->addHTML( ResourceLoader::makeInlineScript( - 'jQuery("#qrcode").qrcode("otpauth://totp/' - . $this->OATHUser->getAccount() - . '?secret=' . $secret . '")' + Xml::encodeJsCall( 'mw.loader.using', array( + array( 'ext.oathauth' ), + new XmlJsCode( + 'function () {' + . '$("#qrcode").qrcode("otpauth://totp/' + . $this->OATHUser->getAccount() + . '?secret=' . $secret. '");' + . '}' + ) + ) ) ) ); $this->getOutput()->addHTML( $out );