summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/opendiscussion.pm
blob: fd5c9673d68c3581722dbe41502d0363d502a5ac (plain)
  1. #!/usr/bin/perl
  2. package IkiWiki::Plugin::opendiscussion;
  3. use warnings;
  4. use strict;
  5. use IkiWiki 2.00;
  6. sub import { #{{{
  7. hook(type => "canedit", id => "opendiscussion", call => \&canedit);
  8. } # }}}
  9. sub canedit ($$) { #{{{
  10. my $page=shift;
  11. my $cgi=shift;
  12. my $session=shift;
  13. my $discussion=gettext("discussion");
  14. return "" if $page=~/\/\Q$discussion\E$/;
  15. return undef;
  16. } #}}}
  17. 1