23 $useHttps = (
isset( $_SERVER[
'HTTPS'] ) && $_SERVER[
'HTTPS'] ==
'on' );
24 $js =
'var RecaptchaOptions = ' . Xml::encodeJsVar(
25 [
'theme' => $wgReCaptchaTheme,
'tabindex' => $tabIndex ]
29 'html' => Html::inlineScript( $js ) .
41 $challenge =
$request->getVal(
'recaptcha_challenge_field',
$request->getVal(
'captchaId' ) );
66 if ( !$recaptcha_response->is_valid ) {
67 $this->recaptcha_error = $recaptcha_response->error;
90 'type' =>
'recaptcha',
91 'mime' =>
'image/png',
104 $params[
'recaptcha_challenge_field'] = [
107 $params[
'recaptcha_response_field'] = [
120 if (
in_array( $this->recaptcha_error, [
121 'invalid-request-cookie',
'incorrect-captcha-sol',
137 return [
'index' => $index ];
173 CaptchaAuthenticationRequest::class,
true );
182 'class' => HTMLReCaptchaField::class,
185 'secure' =>
isset( $_SERVER[
'HTTPS'] ) && $_SERVER[
'HTTPS'] ===
'on',
186 'error' => $captcha->getError(),
192 'class' => HTMLSubmittedValueField::class,
193 'name' =>
'recaptcha_challenge_field',
196 'class' => HTMLSubmittedValueField::class,
197 'name' =>
'recaptcha_response_field',
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
if(! $wgDBerrorLogTZ) $wgRequest
const PARAM_HELP_MSG
(string|array|Message) Specify an alternative i18n documentation message for this parameter.
static getInstance()
Get the global Captcha instance.
Authentication request for ReCaptcha v1.
storeCaptcha( $info)
Generate a captcha session ID and save the info in PHP's session storage.
getFormInformation( $tabIndex=1)
Displays the reCAPTCHA widget.
onAuthChangeFormFields(array $requests, array $fieldInfo, array &$formDescriptor, $action)
passCaptcha( $challenge, $response)
Calls the library function recaptcha_check_answer to verify the users input.
createAuthenticationRequest()
retrieveCaptcha( $index)
Fetch this session's captcha info.
addCaptchaAPI(&$resultArr)
getCaptchaParamsFromRequest(WebRequest $request)
getCaptcha()
Returns an array with 'question' and 'answer' keys.
apiGetAllowedParams(&$module, &$params, $flags)
getCaptchaInfo( $captchaData, $id)
Demo CAPTCHA (not for production usage) and base class for real CAPTCHAs.
isAPICaptchaModule( $module)
string $action
Used to select the right message.
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
this hook is for auditing only $req
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead & $formDescriptor
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
Allows to change the fields on the form that will be generated are created Can be used to omit specific feeds from being outputted You must not use this hook to add use OutputPage::addFeedLink() instead. & $feedLinks hooks can tweak the array to change how login etc forms should look $requests
this hook is for auditing only $response
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
recaptcha_get_html( $pubkey, $error=null, $use_ssl=false)
Gets the challenge HTML (javascript and non-javascript version).
recaptcha_check_answer( $privkey, $remoteip, $challenge, $response, $extra_params=array())
Calls an HTTP POST function to verify if the user's guess was correct.