jenkins-bot has submitted this change and it was merged.

Change subject: Fix QR code generation module dependency
......................................................................


Fix QR code generation module dependency

Bug: T118511
Change-Id: Idf11e9a469f9e9faa342d82843cf06f7e47406c6
---
M special/SpecialOATH.php
1 file changed, 10 insertions(+), 3 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/special/SpecialOATH.php b/special/SpecialOATH.php
index 96c3d6c..8361629 100644
--- a/special/SpecialOATH.php
+++ b/special/SpecialOATH.php
@@ -116,9 +116,16 @@
                        . '<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 );

-- 
To view, visit https://gerrit.wikimedia.org/r/253299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf11e9a469f9e9faa342d82843cf06f7e47406c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: GergÅ‘ Tisza <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to