]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/openid.pm
Coding style change: Remove explcit vim folding markers.
[ikiwiki.git] / IkiWiki / Plugin / openid.pm
index f12cbdaa37fad0c77ada865a521ff68a0d95e785..2933c9ed99960dd8e5edece394f11a6b9b08f085 100644 (file)
@@ -6,22 +6,22 @@ use warnings;
 use strict;
 use IkiWiki 2.00;
 
-sub import { #{{{
+sub import {
        hook(type => "getopt", id => "openid", call => \&getopt);
        hook(type => "getsetup", id => "openid", call => \&getsetup);
        hook(type => "auth", id => "openid", call => \&auth);
        hook(type => "formbuilder_setup", id => "openid",
                call => \&formbuilder_setup, last => 1);
-} # }}}
+}
 
-sub getopt () { #{{{
+sub getopt () {
        eval q{use Getopt::Long};
        error($@) if $@;
        Getopt::Long::Configure('pass_through');
        GetOptions("openidsignup=s" => \$config{openidsignup});
-} #}}}
+}
 
-sub getsetup () { #{{{
+sub getsetup () {
        return
                plugin => {
                        safe => 1,
@@ -34,9 +34,9 @@ sub getsetup () { #{{{
                        safe => 1,
                        rebuild => 0,
                },
-} #}}}
+}
 
-sub formbuilder_setup (@) { #{{{
+sub formbuilder_setup (@) {
        my %params=@_;
 
        my $form=$params{form};
@@ -92,7 +92,7 @@ sub formbuilder_setup (@) { #{{{
        }
 }
 
-sub validate ($$$;$) { #{{{
+sub validate ($$$;$) {
        my $q=shift;
        my $session=shift;
        my $openid_url=shift;
@@ -121,9 +121,9 @@ sub validate ($$$;$) { #{{{
        # eventually bounce them back to auth()
        IkiWiki::redirect($q, $check_url);
        exit 0;
-} #}}}
+}
 
-sub auth ($$) { #{{{
+sub auth ($$) {
        my $q=shift;
        my $session=shift;
 
@@ -147,9 +147,9 @@ sub auth ($$) { #{{{
                # myopenid.com affiliate support
                validate($q, $session, $q->param('openid_identifier'));
        }
-} #}}}
+}
 
-sub getobj ($$) { #{{{
+sub getobj ($$) {
        my $q=shift;
        my $session=shift;
 
@@ -178,13 +178,13 @@ sub getobj ($$) { #{{{
                consumer_secret => sub { return shift()+$secret },
                required_root => $config{cgiurl},
        );
-} #}}}
+}
 
 package IkiWiki;
 
 # This is not used by this plugin, but this seems the best place to put it.
 # Used elsewhere to pretty-display the name of an openid user.
-sub openiduser ($) { #{{{
+sub openiduser ($) {
        my $user=shift;
 
        if ($user =~ m!^https?://! &&