Show
Ignore:
Timestamp:
07/10/2008 08:33:05 AM (5 months ago)
Author:
Geert
Message:

Captcha_Word_Driver added. It picks a word from the list you supply in the captcha i18n file.

What's also cool to note is that the Captcha_Word_Driver extends the Captcha_Basic_Driver and completely inherits its render() method. :)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/drivers/Captcha/Basic.php

    r3027 r3028  
    4747 
    4848                // Calculate character font-size and spacing 
    49                 $default_size = min(Captcha::$config['width'], Captcha::$config['height'] * 2) / strlen(Captcha::$answer); 
     49                $default_size = min(Captcha::$config['width'], Captcha::$config['height'] * 2) / (strlen(Captcha::$answer) + 1); 
    5050                $spacing = (int) (Captcha::$config['width'] * 0.9 / strlen(Captcha::$answer)); 
    5151