return $content;
}
-sub check_canedit ($$$;$$) {
+sub check_canedit ($$$;$) {
my $page=shift;
my $q=shift;
my $session=shift;
my $nonfatal=shift;
- my $nosubs=shift;
my $canedit;
run_hooks(canedit => sub {
$canedit=1;
}
elsif (ref $ret eq 'CODE') {
- error(sprintf(gettext("you are not allowed to change %s"), $page)) if $nosubs && ! $nonfatal;
$ret->() unless $nonfatal;
$canedit=0;
}
my $page=shift;
my ($filename, $tpage, $untrusted)=template_file($name);
+ if (! defined $filename) {
+ error(sprintf(gettext("template %s not found"), $name))
+ }
+
if (defined $page && defined $tpage) {
add_depends($page, $tpage);
}
-
- return unless defined $filename;
-
+
my @opts=(
filter => sub {
my $text_ref = shift;