summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-12-05 18:23:11 +0100
committerAndrey Andreev <narf@devilix.net>2014-12-05 18:23:11 +0100
commit3c0427e7dd11380692f9898d7cc04ba1b5a8491b (patch)
tree0350ade3d4aa3b4bf64d7e898f8d49dd6239df89 /system/helpers
parent82358c1f2ce5117a21e90f6ec96400535c5f4eed (diff)
parent6157e52f1988c3640082fe6fd323ebbc07887259 (diff)
Merge pull request #3393 from preems/develop
Added img_id to capcha helper Close #51
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/captcha_helper.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 2ffa86d97..5fa61e051 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -72,6 +72,7 @@ if ( ! function_exists('create_captcha'))
'expiration' => 7200,
'word_length' => 8,
'font_size' => 16,
+ 'img_id' => '',
'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
'colors' => array(
'background' => array(255,255,255),
@@ -244,7 +245,7 @@ if ( ! function_exists('create_captcha'))
return FALSE;
}
- $img = '<img src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />';
+ $img = '<img '.($img_id === '' ? '' : 'id="'.$img_id.'"').' src="'.$img_url.$img_filename.'" style="width: '.$img_width.'; height: '.$img_height .'; border: 0;" alt=" " />';
ImageDestroy($im);
return array('word' => $word, 'time' => $now, 'image' => $img, 'filename' => $img_filename);