diff options
Diffstat (limited to 'extensions/ConfirmEdit/Asirra.class.php')
-rw-r--r-- | extensions/ConfirmEdit/Asirra.class.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/extensions/ConfirmEdit/Asirra.class.php b/extensions/ConfirmEdit/Asirra.class.php index 1f31d089..cbe51e26 100644 --- a/extensions/ConfirmEdit/Asirra.class.php +++ b/extensions/ConfirmEdit/Asirra.class.php @@ -10,12 +10,12 @@ class Asirra extends SimpleCaptcha { // As we don't have to store anything but some other things to do, // we're going to replace that constructor completely. function __construct() { - global $wgExtensionAssetsPath, $wgAsirraScriptPath; + global $wgExtensionAssetsPath; $this->asirra_localpath = "$wgExtensionAssetsPath/ConfirmEdit"; } function getForm() { - global $wgAsirraEnlargedPosition, $wgAsirraCellsPerRow, $wgOut, $wgLang; + global $wgOut; $wgOut->addModules( 'ext.confirmedit.asirra' ); $js = Html::linkedScript( $this->asirra_clientscript ); @@ -29,6 +29,14 @@ JAVASCRIPT return $js; } + function getMessage( $action ) { + $name = 'asirra-' . $action; + $text = wfMessage( $name )->text(); + # Obtain a more tailored message, if possible, otherwise, fall + # back to the default for edits + return wfMessage( $name, $text )->isDisabled() ? wfMessage( 'asirra-edit' )->text() : $text; + } + function passCaptcha() { global $wgRequest; |