Fix QR code generation module dependency

Bug: T118511
Change-Id: Idf11e9a469f9e9faa342d82843cf06f7e47406c6
This commit is contained in:
Gergő Tisza 2015-11-16 00:39:08 -08:00
parent e743f45af7
commit 3bb7cd6440

View file

@ -116,9 +116,16 @@ class SpecialOATH extends UnlistedSpecialPage {
. '<div id="qrcode"></div>';
$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 );