aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha/captcha_gd.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2013-10-30 13:37:29 +0100
committerAndreas Fischer <bantu@phpbb.com>2013-10-30 13:37:29 +0100
commitef1f99183796f8e246f96bca54ca439bf8ea1750 (patch)
tree0b27c61c441bbe2bc85028a4d0de2d4da8196e9b /phpBB/includes/captcha/captcha_gd.php
parent7aa8f6461f1e85cf91931f56b95384e54fec07c2 (diff)
downloadforums-ef1f99183796f8e246f96bca54ca439bf8ea1750.tar
forums-ef1f99183796f8e246f96bca54ca439bf8ea1750.tar.gz
forums-ef1f99183796f8e246f96bca54ca439bf8ea1750.tar.bz2
forums-ef1f99183796f8e246f96bca54ca439bf8ea1750.tar.xz
forums-ef1f99183796f8e246f96bca54ca439bf8ea1750.zip
[task/code-sniffer] Replace spaces with tabs.
PHPBB3-11980
Diffstat (limited to 'phpBB/includes/captcha/captcha_gd.php')
-rw-r--r--phpBB/includes/captcha/captcha_gd.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php
index f58b590c4b..ab45aa9db6 100644
--- a/phpBB/includes/captcha/captcha_gd.php
+++ b/phpBB/includes/captcha/captcha_gd.php
@@ -26,7 +26,6 @@ class captcha
var $width = 360;
var $height = 96;
-
/**
* Create the image containing $code with a seed of $seed
*/
@@ -69,7 +68,6 @@ class captcha
$bounding_boxes[$i] = $box;
}
-
// Redistribute leftover x-space
$offset = array();
for ($i = 0; $i < $code_len; ++$i)
@@ -99,12 +97,12 @@ class captcha
imagedashedline($img, mt_rand($x -3, $x + 3), mt_rand(0, 4), mt_rand($x -3, $x + 3), mt_rand($this->height - 5, $this->height), $current_colour);
}
}
+
if ($config['captcha_gd_wave'] && ($config['captcha_gd_y_grid'] || $config['captcha_gd_y_grid']))
{
$this->wave($img);
}
-
-
+
if ($config['captcha_gd_3d_noise'])
{
$xoffset = mt_rand(0,9);
@@ -122,11 +120,12 @@ class captcha
$dimm = $bounding_boxes[$i];
$xoffset += ($offset[$i] - $dimm[0]);
$yoffset = mt_rand(-$dimm[1], $this->height - $dimm[3]);
-
+
$noise[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
}
+
$xoffset = 5;
for ($i = 0; $i < $code_len; ++$i)
{
@@ -137,14 +136,17 @@ class captcha
$characters[$i]->drawchar($sizes[$i], $xoffset, $yoffset, $img, $colour->get_resource('background'), $scheme);
$xoffset += $dimm[2];
}
+
if ($config['captcha_gd_wave'])
{
$this->wave($img);
}
+
if ($config['captcha_gd_foreground_noise'])
{
$this->noise_line($img, 0, 0, $this->width, $this->height, $colour->get_resource('background'), $scheme, $bg_colours);
}
+
// Send image
header('Content-Type: image/png');
header('Cache-control: no-cache, no-store');
@@ -233,7 +235,6 @@ class captcha
imagesetthickness($img, 1);
}
-
function captcha_noise_bg_bitmaps()
{
return array(
@@ -292,7 +293,7 @@ class captcha
),
));
}
-
+
/**
* Return bitmaps
*/