Skip to content

Commit

Permalink
Add QuestyCaptcha
Browse files Browse the repository at this point in the history
This relies on two new settings being available in the wikiInfo
sent from the api:
- wwUseQuestyCaptcha
- wwCaptchaQuestions

Like other settings these are used as-is and are not santiy checked
  • Loading branch information
tarrow committed Dec 5, 2023
1 parent 7842fb8 commit f30f332
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dist-persist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ function onSkinTemplateNavigationUniversal( SkinTemplate $skin, array &$links )
$wgReCaptchaSiteKey = getenv('MW_RECAPTCHA_SITEKEY');
$wgReCaptchaSecretKey = getenv('MW_RECAPTCHA_SECRETKEY');

# QuestyCaptcha
$wwUseQuestyCaptcha = $wikiInfo->getSetting('wwUseQuestyCaptcha');
if ($wwUseQuestyCaptcha) {
$wgCaptchaClass = 'QuestyCaptcha';
wfLoadExtensions([ 'ConfirmEdit/QuestyCaptcha' ]);
$wgCaptchaQuestions = $wikiInfo->getSetting('wwCaptchaQuestions');
}

# Mailgun
if ($wwUseMailgunExtension) {
wfLoadExtension( 'Mailgun' );
Expand Down
8 changes: 8 additions & 0 deletions dist/wbstack/src/Settings/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ function onSkinTemplateNavigationUniversal( SkinTemplate $skin, array &$links )
$wgReCaptchaSiteKey = getenv('MW_RECAPTCHA_SITEKEY');
$wgReCaptchaSecretKey = getenv('MW_RECAPTCHA_SECRETKEY');

# QuestyCaptcha
$wwUseQuestyCaptcha = $wikiInfo->getSetting('wwUseQuestyCaptcha');
if ($wwUseQuestyCaptcha) {
$wgCaptchaClass = 'QuestyCaptcha';
wfLoadExtensions([ 'ConfirmEdit/QuestyCaptcha' ]);
$wgCaptchaQuestions = $wikiInfo->getSetting('wwCaptchaQuestions');
}

# Mailgun
if ($wwUseMailgunExtension) {
wfLoadExtension( 'Mailgun' );
Expand Down

0 comments on commit f30f332

Please sign in to comment.