<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
package IkiWiki::Plugin::opendiscussion;

use warnings;
use strict;
use IkiWiki 2.00;

sub import { #{{{
	hook(type =&gt; "canedit", id =&gt; "opendiscussion", call =&gt; \&amp;canedit);
} # }}}

sub canedit ($$) { #{{{
	my $page=shift;
	my $cgi=shift;
	my $session=shift;

	my $discussion=gettext("discussion");
	return "" if $page=~/\/\Q$discussion\E$/;
	return undef;
} #}}}

1
</pre></body></html>