Completed
Pull Request — master (#13)
by
unknown
03:51
created
captcha/recaptcha2.php 1 patch
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -159,8 +159,7 @@  discard block
 block discarded – undo
159 159
 
160 160
 			$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_CONFIG_VISUAL');
161 161
 			trigger_error($this->user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
162
-		}
163
-		else if ($this->request->is_set_post('submit'))
162
+		} else if ($this->request->is_set_post('submit'))
164 163
 		{
165 164
 			trigger_error($this->user->lang['FORM_INVALID'] . adm_back_link($module->u_action));
166 165
 		}
@@ -193,8 +192,7 @@  discard block
 block discarded – undo
193 192
 		if ($this->is_solved())
194 193
 		{
195 194
 			return false;
196
-		}
197
-		else
195
+		} else
198 196
 		{
199 197
 			$contact_link = phpbb_get_board_contact_link($this->config, $this->phpbb_root_path, $this->phpEx);
200 198
 			$explain = $this->user->lang(($this->type != CONFIRM_POST) ? 'GOTHICK_RECAPTCHA2_CONFIRM_EXPLAIN' : 'GOTHICK_RECAPTCHA2_POST_CONFIRM_EXPLAIN', '<a href="' . $contact_link . '">', '</a>');
@@ -254,8 +252,7 @@  discard block
 block discarded – undo
254 252
 		if (!parent::validate())
255 253
 		{
256 254
 			return false;
257
-		}
258
-		else
255
+		} else
259 256
 		{
260 257
 			try
261 258
 			{
@@ -265,14 +262,12 @@  discard block
 block discarded – undo
265 262
 				{
266 263
 					$this->solved = true;
267 264
 					return false;
268
-				}
269
-				else
265
+				} else
270 266
 				{
271 267
 					// TODO: Can we pass something less general back from the response?
272 268
 					return $this->user->lang['GOTHICK_RECAPTCHA2_INCORRECT'];
273 269
 				}
274
-			}
275
-			catch (\Exception $e)
270
+			} catch (\Exception $e)
276 271
 			{
277 272
 				trigger_error($this->user->lang('GOTHICK_RECAPTCHA2_EXCEPTION', $e->getMessage()), E_USER_ERROR);
278 273
 			}
Please login to merge, or discard this patch.
google/recaptcha.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -115,8 +115,7 @@  discard block
 block discarded – undo
115 115
 				throw new Exception('Fatal error while contacting reCAPTCHA. ' . $errno . ': ' . curl_error($conn) . '.');
116 116
 			}
117 117
 			curl_close($conn);
118
-		}
119
-		else
118
+		} else
120 119
 		{
121 120
 			// fallback
122 121
 			$response = file_get_contents($path . $req);
@@ -155,8 +154,7 @@  discard block
 block discarded – undo
155 154
 		if (isset($answers['success']))
156 155
 		{
157 156
 			$recaptcha_response->success = true;
158
-		}
159
-		else
157
+		} else
160 158
 		{
161 159
 			$recaptcha_response->success = false;
162 160
 			if (isset($answers['error-codes']))
Please login to merge, or discard this patch.
google/recaptcha_response.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -1,34 +1,34 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This is a PHP library that handles calling reCAPTCHA.
4
- *    - Documentation and latest version
5
- *          https://developers.google.com/recaptcha/docs/php
6
- *    - Get a reCAPTCHA API Key
7
- *          https://www.google.com/recaptcha/admin/create
8
- *    - Discussion group
9
- *          http://groups.google.com/group/recaptcha
10
- *
11
- * @copyright Copyright (c) 2014, Google Inc.
12
- * @link      http://www.google.com/recaptcha
13
- *
14
- * Permission is hereby granted, free of charge, to any person obtaining a copy
15
- * of this software and associated documentation files (the "Software"), to deal
16
- * in the Software without restriction, including without limitation the rights
17
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- * copies of the Software, and to permit persons to whom the Software is
19
- * furnished to do so, subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in
22
- * all copies or substantial portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30
- * THE SOFTWARE.
31
- */
3
+	 * This is a PHP library that handles calling reCAPTCHA.
4
+	 *    - Documentation and latest version
5
+	 *          https://developers.google.com/recaptcha/docs/php
6
+	 *    - Get a reCAPTCHA API Key
7
+	 *          https://www.google.com/recaptcha/admin/create
8
+	 *    - Discussion group
9
+	 *          http://groups.google.com/group/recaptcha
10
+	 *
11
+	 * @copyright Copyright (c) 2014, Google Inc.
12
+	 * @link      http://www.google.com/recaptcha
13
+	 *
14
+	 * Permission is hereby granted, free of charge, to any person obtaining a copy
15
+	 * of this software and associated documentation files (the "Software"), to deal
16
+	 * in the Software without restriction, including without limitation the rights
17
+	 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+	 * copies of the Software, and to permit persons to whom the Software is
19
+	 * furnished to do so, subject to the following conditions:
20
+	 *
21
+	 * The above copyright notice and this permission notice shall be included in
22
+	 * all copies or substantial portions of the Software.
23
+	 *
24
+	 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+	 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+	 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+	 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+	 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+	 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30
+	 * THE SOFTWARE.
31
+	 */
32 32
 
33 33
 /**
34 34
  * MG: I have significantly changed this library from Google's own, mostly because
Please login to merge, or discard this patch.
language/ar/captcha_recaptcha2.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- *
9
- * Translated By : Bassel Taha Alhitary - www.alhitary.net
10
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 *
9
+	 * Translated By : Bassel Taha Alhitary - www.alhitary.net
10
+	 */
11 11
 
12 12
 /**
13 13
 * DO NOT CHANGE
Please login to merge, or discard this patch.
language/de/captcha_recaptcha2.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- * @German translation by MAGIC - kthx.at
9
- *
10
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 * @German translation by MAGIC - kthx.at
9
+	 *
10
+	 */
11 11
 
12 12
 /**
13 13
 * DO NOT CHANGE
Please login to merge, or discard this patch.
language/it/captcha_recaptcha2.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd. - traduzione italiana a cura di TurboLab.it
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- *
9
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd. - traduzione italiana a cura di TurboLab.it
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 *
9
+	 */
10 10
 
11 11
 /**
12 12
 * DO NOT CHANGE
Please login to merge, or discard this patch.
migrations/release_0_0_4.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- *
9
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 *
9
+	 */
10 10
 
11 11
 namespace gothick\recaptcha2\migrations;
12 12
 
Please login to merge, or discard this patch.
ext.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- *
9
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 *
9
+	 */
10 10
 
11 11
 namespace gothick\recaptcha2\migrations;
12 12
 
Please login to merge, or discard this patch.
google/exception.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Gothick reCAPTCHA 2.0
4
- *
5
- * @package phpBB Extension - reCAPTCHA 2.0
6
- * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
- * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
- *
9
- */
3
+	 * Gothick reCAPTCHA 2.0
4
+	 *
5
+	 * @package phpBB Extension - reCAPTCHA 2.0
6
+	 * @copyright (c) 2015 Matt Gibson Creative Ltd.
7
+	 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
8
+	 *
9
+	 */
10 10
 
11 11
 namespace gothick\recaptcha2\migrations;
12 12
 
Please login to merge, or discard this patch.