mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-12-18 02:41:01 +00:00
Fix hook copy paste fail
Move rest of captcha params out of api/ApiEditPage.php
This commit is contained in:
parent
80e9b337ee
commit
9e4951f262
Notes:
Sam Reed
2011-11-23 20:37:13 +00:00
|
@ -428,6 +428,13 @@ class SimpleCaptcha {
|
||||||
* @return bool false if the CAPTCHA is rejected, true otherwise
|
* @return bool false if the CAPTCHA is rejected, true otherwise
|
||||||
*/
|
*/
|
||||||
private function doConfirmEdit( $editPage, $newtext, $section, $merged = false ) {
|
private function doConfirmEdit( $editPage, $newtext, $section, $merged = false ) {
|
||||||
|
global $wgRequest;
|
||||||
|
if ( $wgRequest->getVal( 'captchaid' ) ) {
|
||||||
|
$wgRequest->setVal( 'wpCaptchaId', $wgRequest->getVal( 'captchaid' ) );
|
||||||
|
}
|
||||||
|
if ( $wgRequest->getVal( 'captchaword' ) ) {
|
||||||
|
$wgRequest->setVal( 'wpCaptchaWord', $wgRequest->getVal( 'captchaword' ) );
|
||||||
|
}
|
||||||
if ( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
|
if ( $this->shouldCheck( $editPage, $newtext, $section, $merged ) ) {
|
||||||
return $this->passCaptcha();
|
return $this->passCaptcha();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -196,7 +196,7 @@ $wgHooks['EmailUser'][] = 'ConfirmEditHooks::confirmEmailUser';
|
||||||
# Register API hook
|
# Register API hook
|
||||||
$wgHooks['APIEditBeforeSave'][] = 'ConfirmEditHooks::confirmEditAPI';
|
$wgHooks['APIEditBeforeSave'][] = 'ConfirmEditHooks::confirmEditAPI';
|
||||||
$wgHooks['APIGetAllowedParams'][] = 'ConfirmEditHooks::APIGetAllowedParams';
|
$wgHooks['APIGetAllowedParams'][] = 'ConfirmEditHooks::APIGetAllowedParams';
|
||||||
$wgHooks['APIEditBeforeSave'][] = 'ConfirmEditHooks::APIEditBeforeSave';
|
$wgHooks['APIGetParamDescription'][] = 'ConfirmEditHooks::APIGetParamDescription';
|
||||||
|
|
||||||
$wgAutoloadClasses['ConfirmEditHooks'] = "$wgConfirmEditIP/ConfirmEditHooks.php";
|
$wgAutoloadClasses['ConfirmEditHooks'] = "$wgConfirmEditIP/ConfirmEditHooks.php";
|
||||||
$wgAutoloadClasses['SimpleCaptcha']= "$wgConfirmEditIP/Captcha.php";
|
$wgAutoloadClasses['SimpleCaptcha']= "$wgConfirmEditIP/Captcha.php";
|
||||||
|
|
Loading…
Reference in a new issue