leucosticte has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/175389

Change subject: Add QuestyCaptchaGetCaptcha hook
......................................................................

Add QuestyCaptchaGetCaptcha hook

This hook makes it possible for hook functions to substitute a
different Questy question.

Change-Id: I2698bb587b114d3fb9c15939c9610c984efc6c95
Task: T75695
---
M QuestyCaptcha.class.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmEdit 
refs/changes/89/175389/1

diff --git a/QuestyCaptcha.class.php b/QuestyCaptcha.class.php
index a7ab37b..efa36fc 100644
--- a/QuestyCaptcha.class.php
+++ b/QuestyCaptcha.class.php
@@ -30,7 +30,9 @@
 
        function getCaptcha() {
                global $wgCaptchaQuestions;
-               return $wgCaptchaQuestions[mt_rand( 0, count( 
$wgCaptchaQuestions ) - 1 )]; // pick a question, any question
+               $question = $wgCaptchaQuestions[mt_rand( 0, count( 
$wgCaptchaQuestions ) - 1 )]; // pick a question, any question
+               wfRunHooks( 'QuestyCaptchaGetCaptcha', array( &$question ) );
+               return $question;
        }
 
        function getForm() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2698bb587b114d3fb9c15939c9610c984efc6c95
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: leucosticte <[email protected]>

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

Reply via email to