summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/opendiscussion.pm
blob: c835f01061ea8a5364d369b768ebbada2fb6acfd (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