summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorPreetham <me@preetham.in>2014-11-12 14:36:35 +0100
committerPreetham <me@preetham.in>2014-11-12 14:36:35 +0100
commit83aeef1d8602b04716b86790a023bb0211fa25ce (patch)
tree7129b39bb32bf94238c33638a82c57d61c1c44ad /system/helpers
parent692e7967d48c67f28f52da6051e4715a6d891b5a (diff)
Closing #656 and updating documentation
Signed-off-by: Preetham <me@preetham.in>
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/captcha_helper.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 8c2cfa43e..4398d3191 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -71,7 +71,7 @@ if ( ! function_exists('create_captcha'))
'font_path' => '',
'expiration' => 7200,
'word_length' => 8,
- 'font_size' =>16,
+ 'font_size' =>16,
'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'colors' => array(
'background' => array(255,255,255),
@@ -194,13 +194,13 @@ if ( ! function_exists('create_captcha'))
$use_font = ($font_path !== '' && file_exists($font_path) && function_exists('imagettftext'));
if ($use_font === FALSE)
{
- $font_size = $font_size>5?5:$font_size;
+ ($font_size >= 5) && $font_size = 5;;
$x = mt_rand(0, $img_width / ($length / 3));
$y = 0;
}
else
{
- $font_size = $font_size>30?30:$font_size;
+ ($font_size > 30) && $font_size = 30;
$x = mt_rand(0, $img_width / ($length / 1.5));
$y = $font_size + 2;
}