diff options
Diffstat (limited to 'phpBB/includes/captcha/captcha_gd_wave.php')
-rw-r--r-- | phpBB/includes/captcha/captcha_gd_wave.php | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/phpBB/includes/captcha/captcha_gd_wave.php b/phpBB/includes/captcha/captcha_gd_wave.php index 27422513d9..c2a4d3a31e 100644 --- a/phpBB/includes/captcha/captcha_gd_wave.php +++ b/phpBB/includes/captcha/captcha_gd_wave.php @@ -1,18 +1,18 @@ <?php /** * -* @package VC -* @version $Id$ -* @copyright (c) 2006 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ /** * Wave3D CAPTCHA -* -* @author Robert Hetzler -* @package VC */ class captcha { @@ -87,7 +87,7 @@ class captcha $fontcolors[0] = imagecolorallocate($img, mt_rand(0, 120), mt_rand(0, 120), mt_rand(0, 120)); - $colors = array(); + $colors = array(); $minr = mt_rand(20, 30); $ming = mt_rand(20, 30); @@ -185,7 +185,7 @@ class captcha for ($x = 1; $x <= $full_x; ++$x) { - $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, 1, $x_grid, $y_grid); + $cur_height = $this->wave_height($x, $y, $subdivision_factor) + $this->grid_height($x, $y, $x_grid, $y_grid, 1); // height is a z-factor, not a y-factor $offset = $cur_height - $prev_height; @@ -265,7 +265,7 @@ class captcha return ((sin($x / (3 * $factor)) + sin($y / (3 * $factor))) * 10 * $tweak); } - function grid_height($x, $y, $factor = 1, $x_grid, $y_grid) + function grid_height($x, $y, $x_grid, $y_grid, $factor = 1) { return ((!($x % ($x_grid * $factor)) || !($y % ($y_grid * $factor))) ? 3 : 0); } @@ -841,5 +841,3 @@ class captcha ); } } - -?>
\ No newline at end of file |