jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/381531 )

Change subject: Register providers within extension.json instead of a callback
......................................................................


Register providers within extension.json instead of a callback

Follows-up I153e372615f573c5955cf7192f22ac0dd7cbb211

See:
* https://www.mediawiki.org/wiki/Manual:$wgAuthManagerAutoConfig
* 
https://www.mediawiki.org/wiki/Manual:Extension.json/Schema#AuthManagerAutoConfig

Change-Id: Ic3438403f3756c3718bd49ed97c49b866f793322
---
M extension.json
M includes/NewSignupPage.class.php
2 files changed, 8 insertions(+), 12 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified
  Anomie: Looks good to me, but someone else must approve



diff --git a/extension.json b/extension.json
index ef54025..4f51fe5 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
        "name": "New Signup Page",
-       "version": "1.0.0",
+       "version": "1.1.0",
        "author": [
                "Jack Phoenix"
        ],
@@ -8,7 +8,6 @@
        "url": "https://www.mediawiki.org/wiki/Extension:NewSignupPage";,
        "descriptionmsg": "newsignuppage-desc",
        "type": "other",
-       "callback": "NewSignupPage::registerExtension",
        "config": {
                "RegisterTrack": false,
                "AutoAddFriendOnInvite": false,
@@ -24,6 +23,13 @@
                "NewSignupPageAuthenticationRequest": 
"includes/auth/NewSignupPageAuthenticationRequest.php",
                "NewSignupPageSecondaryAuthenticationProvider": 
"includes/auth/NewSignupPageSecondaryAuthenticationProvider.php"
        },
+       "AuthManagerAutoConfig": {
+               "secondaryauth": {
+                       "NewSignupPageSecondaryAuthenticationProvider": {
+                               "class": 
"NewSignupPageSecondaryAuthenticationProvider"
+                       }
+               }
+       },
        "Hooks": {
                "BeforePageDisplay": [
                        "NewSignupPage::onBeforePageDisplay"
diff --git a/includes/NewSignupPage.class.php b/includes/NewSignupPage.class.php
index 4b34d2c..1931868 100644
--- a/includes/NewSignupPage.class.php
+++ b/includes/NewSignupPage.class.php
@@ -13,16 +13,6 @@
 class NewSignupPage {
 
        /**
-        * Automatically register our new preauth provider with AuthManager when
-        * this extension is enabled
-        */
-       public static function registerExtension() {
-               global $wgAuthManagerAutoConfig;
-               
$wgAuthManagerAutoConfig['secondaryauth'][NewSignupPageSecondaryAuthenticationProvider::class]
 =
-                               [ 'class' => 
NewSignupPageSecondaryAuthenticationProvider::class ];
-       }
-
-       /**
         * Add the JavaScript file to the page output on the signup page.
         *
         * @param OutputPage $out

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic3438403f3756c3718bd49ed97c49b866f793322
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/NewSignupPage
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen <samanthanguyen1...@gmail.com>
Gerrit-Reviewer: Anomie <bjor...@wikimedia.org>
Gerrit-Reviewer: Gergő Tisza <gti...@wikimedia.org>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to