]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/todo/require_CAPTCHA_to_edit.mdwn
Merge commit 'upstream/master' into prv/po
[git.ikiwiki.info.git] / doc / todo / require_CAPTCHA_to_edit.mdwn
index 110b4167feef99b8d48655ffd42d33f76dacd0eb..83ba07eb0f8bcd8e9c110c8d5b213fdb139c3229 100644 (file)
@@ -91,15 +91,15 @@ ignored.
 
 --- a/IkiWiki/Plugin/openid.pm
 +++ b/IkiWiki/Plugin/openid.pm
-@@ -18,6 +18,7 @@ sub getopt () { #{{{
+@@ -18,6 +18,7 @@ sub getopt () {
        error($@) if $@;
        Getopt::Long::Configure('pass_through');
        GetOptions("openidsignup=s" => \$config{openidsignup});
 +      GetOptions("openidneedscaptcha=s" => \$config{openidneedscaptcha});
- } #}}}
+ }
  
- sub formbuilder_setup (@) { #{{{
-@@ -61,6 +62,7 @@ sub formbuilder_setup (@) { #{{{
+ sub formbuilder_setup (@) {
+@@ -61,6 +62,7 @@ sub formbuilder_setup (@) {
                        # Skip all other required fields in this case.
                        foreach my $field ($form->field) {
                                next if $field eq "openid_url";
@@ -107,7 +107,7 @@ ignored.
                                $form->field(name => $field, required => 0,
                                        validate => '/.*/');
                        }
-@@ -96,6 +98,18 @@ sub validate ($$$;$) { #{{{
+@@ -96,6 +98,18 @@ sub validate ($$$;$) {
                }
        }
  
@@ -152,19 +152,19 @@ use warnings;
 use strict;
 use IkiWiki 2.00;
 
-sub import { #{{{
+sub import {
        hook(type => "formbuilder_setup", id => "recaptcha", call => \&formbuilder_setup);
-} # }}}
+}
 
-sub getopt () { #{{{
+sub getopt () {
        eval q{use Getopt::Long};
        error($@) if $@;
        Getopt::Long::Configure('pass_through');
        GetOptions("reCaptchaPubKey=s" => \$config{reCaptchaPubKey});
        GetOptions("reCaptchaPrivKey=s" => \$config{reCaptchaPrivKey});
-} #}}}
+}
 
-sub formbuilder_setup (@) { #{{{
+sub formbuilder_setup (@) {
        my %params=@_;
 
        my $form=$params{form};
@@ -274,7 +274,7 @@ EOTAGS
                                });
                }
        }
-} # }}}
+}
 
 # The following function is borrowed from
 # Captcha::reCAPTCHA by Andy Armstrong and are under the PERL Artistic License