Merge "Added getMessage() method"

This commit is contained in:
awjrichards 2012-10-12 23:37:29 +00:00 committed by Gerrit Code Review
commit 792a05cc87

View file

@ -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;