summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/opendiscussion.pm
blob: 4b1a432b21d32c3948fd7bf623a7cfe79f04dff6 (plain)
  1. #!/usr/bin/perl
  2. package IkiWiki::Plugin::opendiscussion;
  3. use warnings;
  4. use strict;
  5. use IkiWiki;
  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