Index: trunk/extensions/LiquidThreads/api/ApiThreadAction.php |
— | — | @@ -183,6 +183,13 @@ |
184 | 184 | $newParent = Threads::withRoot( $article ); |
185 | 185 | } |
186 | 186 | |
| 187 | + if ( isset($params['captchaword']) ) { |
| 188 | + $requestData['captchaword'] = $params['captchaword']; |
| 189 | + } |
| 190 | + if ( isset($params['captchaid']) ) { |
| 191 | + $requestData['captchaid'] = $params['captchaid']; |
| 192 | + } |
| 193 | + |
187 | 194 | global $wgUser; |
188 | 195 | $errors = $newParent->title()->getUserPermissionsErrors( 'lqt-merge', $wgUser ); |
189 | 196 | if ( $errors ) { |
— | — | @@ -301,6 +308,14 @@ |
302 | 309 | if ( $wgUser->isAllowed('bot') ) { |
303 | 310 | $requestData['bot'] = true; |
304 | 311 | } |
| 312 | + |
| 313 | + if ( $params['captchaword'] !== null ) { |
| 314 | + $requestData['captchaword'] = $params['captchaword']; |
| 315 | + } |
| 316 | + |
| 317 | + if ( $params['captchaid'] !== null ) { |
| 318 | + $requestData['captchaid'] = $params['captchaid']; |
| 319 | + } |
305 | 320 | |
306 | 321 | $editReq = new FauxRequest( $requestData, true ); |
307 | 322 | LqtView::fixFauxRequestSession( $editReq ); |
— | — | @@ -421,6 +436,14 @@ |
422 | 437 | if ( $wgUser->isAllowed('bot') ) { |
423 | 438 | $requestData['bot'] = true; |
424 | 439 | } |
| 440 | + |
| 441 | + if ( $params['captchaword'] !== null ) { |
| 442 | + $requestData['captchaword'] = $params['captchaword']; |
| 443 | + } |
| 444 | + |
| 445 | + if ( $params['captchaid'] !== null ) { |
| 446 | + $requestData['captchaid'] = $params['captchaid']; |
| 447 | + } |
425 | 448 | |
426 | 449 | $editReq = new FauxRequest( $requestData, true ); |
427 | 450 | LqtView::fixFauxRequestSession( $editReq ); |
— | — | @@ -538,6 +561,14 @@ |
539 | 562 | if ( $wgUser->isAllowed('bot') ) { |
540 | 563 | $requestData['bot'] = true; |
541 | 564 | } |
| 565 | + |
| 566 | + if ( $params['captchaword'] !== null ) { |
| 567 | + $requestData['captchaword'] = $params['captchaword']; |
| 568 | + } |
| 569 | + |
| 570 | + if ( $params['captchaid'] !== null ) { |
| 571 | + $requestData['captchaid'] = $params['captchaid']; |
| 572 | + } |
542 | 573 | |
543 | 574 | $editReq = new FauxRequest( $requestData, true ); |
544 | 575 | LqtView::fixFauxRequestSession( $editReq ); |
— | — | @@ -940,6 +971,8 @@ |
941 | 972 | 'method' => null, |
942 | 973 | 'operand' => null, |
943 | 974 | 'gettoken' => null, |
| 975 | + 'captchaword' => null, |
| 976 | + 'captchaid' => null, |
944 | 977 | ); |
945 | 978 | } |
946 | 979 | |
Index: trunk/extensions/LiquidThreads/lqt.js |
— | — | @@ -1056,6 +1056,14 @@ |
1057 | 1057 | 'reason' : summary, |
1058 | 1058 | 'bump' : bump |
1059 | 1059 | }; |
| 1060 | + |
| 1061 | + if ( $j('#wpCaptchaWord') ) { |
| 1062 | + newTopicParams.captchaword = $j('#wpCaptchaWord').val(); |
| 1063 | + } |
| 1064 | + |
| 1065 | + if ( $j('#wpCaptchaId') ) { |
| 1066 | + newTopicParams.captchaid = $j('#wpCaptchaId').val(); |
| 1067 | + } |
1060 | 1068 | |
1061 | 1069 | if ( typeof signature != 'undefined' ) { |
1062 | 1070 | newTopicParams.signature = signature; |
— | — | @@ -1085,6 +1093,14 @@ |
1086 | 1094 | 'reason' : summary, |
1087 | 1095 | 'bump' : bump |
1088 | 1096 | }; |
| 1097 | + |
| 1098 | + if ( $j('#wpCaptchaWord') ) { |
| 1099 | + replyParams.captchaword = $j('#wpCaptchaWord').val(); |
| 1100 | + } |
| 1101 | + |
| 1102 | + if ( $j('#wpCaptchaId') ) { |
| 1103 | + replyParams.captchaid = $j('#wpCaptchaId').val(); |
| 1104 | + } |
1089 | 1105 | |
1090 | 1106 | if ( typeof signature != 'undefined' ) { |
1091 | 1107 | replyParams.signature = signature; |
— | — | @@ -1113,6 +1129,14 @@ |
1114 | 1130 | 'bump' : bump, |
1115 | 1131 | 'subject':subject |
1116 | 1132 | }; |
| 1133 | + |
| 1134 | + if ( $j('#wpCaptchaWord') ) { |
| 1135 | + request.captchaword = $j('#wpCaptchaWord').val(); |
| 1136 | + } |
| 1137 | + |
| 1138 | + if ( $j('#wpCaptchaId') ) { |
| 1139 | + request.captchaid = $j('#wpCaptchaId').val(); |
| 1140 | + } |
1117 | 1141 | |
1118 | 1142 | if ( typeof signature != 'undefined' ) { |
1119 | 1143 | request.signature = signature; |