http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97917
Revision: 97917
Author: werdna
Date: 2011-09-23 13:09:05 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
LiquidThreads: Submit captcha information, if available
Modified Paths:
--------------
trunk/extensions/LiquidThreads/api/ApiThreadAction.php
trunk/extensions/LiquidThreads/lqt.js
Modified: trunk/extensions/LiquidThreads/api/ApiThreadAction.php
===================================================================
--- trunk/extensions/LiquidThreads/api/ApiThreadAction.php 2011-09-23
12:57:27 UTC (rev 97916)
+++ trunk/extensions/LiquidThreads/api/ApiThreadAction.php 2011-09-23
13:09:05 UTC (rev 97917)
@@ -183,6 +183,13 @@
$newParent = Threads::withRoot( $article );
}
+ if ( isset($params['captchaword']) ) {
+ $requestData['captchaword'] = $params['captchaword'];
+ }
+ if ( isset($params['captchaid']) ) {
+ $requestData['captchaid'] = $params['captchaid'];
+ }
+
global $wgUser;
$errors = $newParent->title()->getUserPermissionsErrors(
'lqt-merge', $wgUser );
if ( $errors ) {
@@ -301,6 +308,14 @@
if ( $wgUser->isAllowed('bot') ) {
$requestData['bot'] = true;
}
+
+ if ( $params['captchaword'] !== null ) {
+ $requestData['captchaword'] = $params['captchaword'];
+ }
+
+ if ( $params['captchaid'] !== null ) {
+ $requestData['captchaid'] = $params['captchaid'];
+ }
$editReq = new FauxRequest( $requestData, true );
LqtView::fixFauxRequestSession( $editReq );
@@ -421,6 +436,14 @@
if ( $wgUser->isAllowed('bot') ) {
$requestData['bot'] = true;
}
+
+ if ( $params['captchaword'] !== null ) {
+ $requestData['captchaword'] = $params['captchaword'];
+ }
+
+ if ( $params['captchaid'] !== null ) {
+ $requestData['captchaid'] = $params['captchaid'];
+ }
$editReq = new FauxRequest( $requestData, true );
LqtView::fixFauxRequestSession( $editReq );
@@ -538,6 +561,14 @@
if ( $wgUser->isAllowed('bot') ) {
$requestData['bot'] = true;
}
+
+ if ( $params['captchaword'] !== null ) {
+ $requestData['captchaword'] = $params['captchaword'];
+ }
+
+ if ( $params['captchaid'] !== null ) {
+ $requestData['captchaid'] = $params['captchaid'];
+ }
$editReq = new FauxRequest( $requestData, true );
LqtView::fixFauxRequestSession( $editReq );
@@ -940,6 +971,8 @@
'method' => null,
'operand' => null,
'gettoken' => null,
+ 'captchaword' => null,
+ 'captchaid' => null,
);
}
Modified: trunk/extensions/LiquidThreads/lqt.js
===================================================================
--- trunk/extensions/LiquidThreads/lqt.js 2011-09-23 12:57:27 UTC (rev
97916)
+++ trunk/extensions/LiquidThreads/lqt.js 2011-09-23 13:09:05 UTC (rev
97917)
@@ -1056,6 +1056,14 @@
'reason' : summary,
'bump' : bump
};
+
+ if ( $j('#wpCaptchaWord') ) {
+ newTopicParams.captchaword =
$j('#wpCaptchaWord').val();
+ }
+
+ if ( $j('#wpCaptchaId') ) {
+ newTopicParams.captchaid =
$j('#wpCaptchaId').val();
+ }
if ( typeof signature != 'undefined' ) {
newTopicParams.signature = signature;
@@ -1085,6 +1093,14 @@
'reason' : summary,
'bump' : bump
};
+
+ if ( $j('#wpCaptchaWord') ) {
+ replyParams.captchaword =
$j('#wpCaptchaWord').val();
+ }
+
+ if ( $j('#wpCaptchaId') ) {
+ replyParams.captchaid =
$j('#wpCaptchaId').val();
+ }
if ( typeof signature != 'undefined' ) {
replyParams.signature = signature;
@@ -1113,6 +1129,14 @@
'bump' : bump,
'subject':subject
};
+
+ if ( $j('#wpCaptchaWord') ) {
+ request.captchaword = $j('#wpCaptchaWord').val();
+ }
+
+ if ( $j('#wpCaptchaId') ) {
+ request.captchaid = $j('#wpCaptchaId').val();
+ }
if ( typeof signature != 'undefined' ) {
request.signature = signature;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs