]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - IkiWiki/Plugin/anonok.pm
web commit by http://willu.myopenid.com/: Add fix for OpenID and reCaptcha plugin
[git.ikiwiki.info.git] / IkiWiki / Plugin / anonok.pm
1 #!/usr/bin/perl
2 package IkiWiki::Plugin::anonok;
4 use warnings;
5 use strict;
6 use IkiWiki 2.00;
8 sub import { #{{{
9         hook(type => "canedit", id => "anonok", call => \&canedit,);
10 } # }}}
12 sub canedit ($$$) { #{{{
13         my $page=shift;
14         my $cgi=shift;
15         my $session=shift;
17         my $ret;
19         if (exists $config{anonok_pagespec} && length $config{anonok_pagespec}) {
20                 if (pagespec_match($page, $config{anonok_pagespec},
21                                    location => $page)) {
22                         return "";
23                 }
24                 else {
25                         return undef;
26                 }
27         }
28         else {
29                 return "";
30         }
31 } #}}}
33 1