Allow user to pass a hash of captcha questions
Change-Id: I102ff6991831901c578dab4107b0c23245da9d4b Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
bd415b1503
commit
ffe475ba99
|
@ -14,7 +14,9 @@ class mediawiki(
|
|||
$wg_dbpassword = undef,
|
||||
$wg_secretkey = undef,
|
||||
$wg_upgradekey = undef,
|
||||
# TODO(pabelanger): Remove this once 284418 lands.
|
||||
$wg_captchaquestions_answer = undef,
|
||||
$wg_captchaquestions = {},
|
||||
$wg_googleanalyticsaccount = undef,
|
||||
) {
|
||||
|
||||
|
|
|
@ -183,11 +183,18 @@ $wgExtraNamespaces[111] = 'Obsolete_talk';
|
|||
$wgNamespacesWithSubpages[110] = true;
|
||||
|
||||
## Extensions
|
||||
|
||||
#
|
||||
require_once( "$IP/extensions/ConfirmEdit/ConfirmEdit.php" );
|
||||
require_once( "$IP/extensions/ConfirmEdit/QuestyCaptcha.php" );
|
||||
|
||||
$wgCaptchaClass = 'QuestyCaptcha';
|
||||
$wgCaptchaQuestions[] = array( 'question' => 'What\'s the secret word?', 'answer' => "<%= scope.lookupvar('::mediawiki::wg_captchaquestions_answer') %>" );
|
||||
$arr = array (
|
||||
<% @wg_captchaquestions.each do|key, val| -%>
|
||||
"<%= key %>" => "<%= val %>",
|
||||
<% end -%>
|
||||
);
|
||||
foreach ( $arr as $key => $value ) {
|
||||
$wgCaptchaQuestions[] = array( 'question' => $key, 'answer' => $value );
|
||||
}
|
||||
$wgGroupPermissions['user' ]['skipcaptcha'] = true;
|
||||
|
||||
require_once( "$IP/extensions/OpenID/OpenID.php" );
|
||||
|
|
Loading…
Reference in New Issue