Changeset 259

Show
Ignore:
Timestamp:
10/05/06 19:00:41 (2 years ago)
Author:
ogawa
Message:

Be compatible with CPAN version of Authen-Captcha which doesn't support "secret" option.

Location:
captcha/trunk/plugins/captcha
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • captcha/trunk/plugins/captcha/captcha.pl

    r257 r259  
    7171    # configure Auth::Captcha 
    7272    $captcha->output_folder($cfg->{captcha_images_path}); 
    73     $captcha->secret($cfg->{captcha_secret} || ''); 
     73    $captcha->secret($cfg->{captcha_secret} || '') 
     74        if $captcha->can('secret'); 
    7475 
    7576    my $ttl = $cfg->{captcha_ttl}; 
  • captcha/trunk/plugins/captcha/captcha_js.cgi

    r257 r259  
    4646 
    4747    $captcha->expire($cfg->{captcha_ttl} || 3600); 
    48     $captcha->secret($cfg->{captcha_secret} || ''); 
     48    $captcha->secret($cfg->{captcha_secret} || '') 
     49        if $captcha->can('secret'); 
    4950    $captcha->output_folder($cfg->{captcha_images_path}); 
    5051    my $captcha_length = $cfg->{captcha_length} || 5; 
  • captcha/trunk/plugins/captcha/captcha_js.fcgi

    r257 r259  
    5050 
    5151    $captcha->expire($cfg->{captcha_ttl} || 3600); 
    52     $captcha->secret($cfg->{captcha_secret} || ''); 
     52    $captcha->secret($cfg->{captcha_secret} || '') 
     53        if $captcha->can('secret'); 
    5354    $captcha->output_folder($cfg->{captcha_images_path}); 
    5455    my $captcha_length = $cfg->{captcha_length} || 5;