Changeset 263 for captcha/trunk/plugins

Show
Ignore:
Timestamp:
10/17/06 10:40:34 (2 years ago)
Author:
ogawa
Message:

Fix a bug for captcha-disabled blogs.

Files:
1 modified

Legend:

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

    r261 r263  
    1717use Authen::Captcha; 
    1818use base 'MT::Plugin'; 
    19 our $VERSION = '0.12'; 
     19our $VERSION = '0.13'; 
    2020 
    2121my $dirname = dirname(__FILE__); 
     
    6060    } 
    6161 
    62     my $q = $app->{query}; 
    63     my $code = $q->param('captcha_code') or return 0; 
    64     my $md5 = $q->param('captcha_md5') or return 0; 
    65  
    6662    # load config 
    6763    my $cfg = $plugin->get_config_hash('blog:' . $blog->id); 
     
    6965    # check if captcha-test disabled 
    7066    return 1 unless $cfg->{captcha_enable}; 
     67 
     68    my $q = $app->{query}; 
     69    my $code = $q->param('captcha_code') or return 0; 
     70    my $md5 = $q->param('captcha_md5') or return 0; 
    7171 
    7272    # configure Auth::Captcha