Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348584 )

Change subject: Don't set the default value of another extension in 
extension.json
......................................................................

Don't set the default value of another extension in extension.json

See also: Iaef32efab397e82ff70ddca8ac79c545c5b7d2bb

Bug: T152929
Change-Id: I3e12fcbbede5a31e4264aaf8586087f7d60787c2
---
M WikiForumHooks.php
M extension.json
2 files changed, 16 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiForum 
refs/changes/84/348584/1

diff --git a/WikiForumHooks.php b/WikiForumHooks.php
index ab769fc..51aedf8 100644
--- a/WikiForumHooks.php
+++ b/WikiForumHooks.php
@@ -164,4 +164,18 @@
 
                return true;
        }
+
+       /**
+        * Sets the extension up, after it is loaded by extension registration 
by:
+        *  - setting the captcha triggers for ConfirmEdit, if not done already
+        */
+       public static function setupExtension() {
+               global $wgCaptchaTriggers;
+
+               if ( is_array( $wgCaptchaTriggers ) && !isset( 
$wgCaptchaTriggers['wikiforum'] ) ) {
+                       $wgCaptchaTriggers['wikiforum'] = true;
+               } else if ( !is_array( $wgCaptchaTriggers ) ) {
+                       $wgCaptchaTriggers = [ 'wikiforum' => true ];
+               }
+       }
 }
diff --git a/extension.json b/extension.json
index 62f88c1..11f7cf8 100644
--- a/extension.json
+++ b/extension.json
@@ -10,6 +10,7 @@
        "descriptionmsg": "wikiforum-desc",
        "license-name": "GPL-3.0+",
        "type": "other",
+       "callback": "WikiForumHooks::setupExtension",
        "GroupPermissions": {
                "forumadmin": {
                        "wikiforum-admin": true,
@@ -79,10 +80,7 @@
        "config": {
                "WikiForumAllowAnonymous": true,
                "WikiForumSmilies": [],
-               "WikiForumLogInRC": true,
-               "CaptchaTriggers": {
-                       "wikiforum": true
-               }
+               "WikiForumLogInRC": true
        },
        "manifest_version": 1
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e12fcbbede5a31e4264aaf8586087f7d60787c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiForum
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.stargatewis...@gmail.com>

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

Reply via email to