Changeset 3046
- Timestamp:
- 07/11/08 03:31:08 (1 month ago)
- Files:
-
- trunk/system/config/captcha.php (modified) (1 diff)
- trunk/system/libraries/Captcha.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/system/config/captcha.php
r3032 r3046 8 8 * 9 9 * Group Options: 10 * style - Captcha type, e.g. basic, alpha, word, math, riddle 11 * width - Width of the Captcha image 12 * height - Height of the Captcha image 13 * complexity - Difficulty level (0-10), usage depends on chosen style 14 * background_path - Path to folder in which background image reside 15 * background_file - Image file name 16 * font_path - Path to folder in which fonts reside 17 * font_file - Font file name 10 * style - Captcha type, e.g. basic, alpha, word, math, riddle 11 * width - Width of the Captcha image 12 * height - Height of the Captcha image 13 * complexity - Difficulty level (0-10), usage depends on chosen style 14 * background - Path to background image file 15 * font - Path to font file 18 16 */ 19 17 $config['default'] = array 20 18 ( 21 'style' => 'basic', 22 'width' => 150, 23 'height' => 50, 24 'complexity' => 4, 25 'background_path' => '', 26 'background_file' => '', 27 'font_path' => SYSPATH.'fonts/', 28 'font_file' => 'DejaVuSerif.ttf', 19 'style' => 'basic', 20 'width' => 150, 21 'height' => 50, 22 'complexity' => 4, 23 'background' => '', 24 'font' => SYSPATH.'fonts/DejaVuSerif.ttf', 29 25 ); trunk/system/libraries/Captcha.php
r3045 r3046 94 94 95 95 // If using a background image, check if it exists 96 if ( ! empty($config['background _file']))97 { 98 self::$config['background'] = str_replace('\\', '/', realpath($config['background _path'])).'/'.$config['background_file'];96 if ( ! empty($config['background'])) 97 { 98 self::$config['background'] = str_replace('\\', '/', realpath($config['background'])); 99 99 100 100 if ( ! file_exists(self::$config['background'])) … … 103 103 104 104 // If using a font, check if it exists 105 if ( ! empty($config['font _file']))106 { 107 self::$config['font'] = str_replace('\\', '/', realpath($config['font _path'])).'/'.$config['font_file'];105 if ( ! empty($config['font'])) 106 { 107 self::$config['font'] = str_replace('\\', '/', realpath($config['font'])); 108 108 109 109 if ( ! file_exists(self::$config['font']))
