foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{edittemplate}) {
- if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
+ if (exists $pagesources{$page} &&
+ grep { $_ eq $pagesources{$page} } @$needsbuild) {
# remove state, it will be re-added
# if the preprocessor directive is still
# there during the rebuild
return "" if $params{page} ne $params{destpage};
if (! exists $params{template} || ! length($params{template})) {
- return return "[[meta ".gettext("template not specified")."]]";
+ error gettext("template not specified")
}
if (! exists $params{match} || ! length($params{match})) {
- return return "[[meta ".gettext("match not specified")."]]";
+ error gettext("match not specified")
}
$pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};
);
};
if ($@) {
- return "[[pagetemplate ".gettext("failed to process")." $@]]";
+ # Indicate that the earlier preprocessor directive set
+ # up a template that doesn't work.
+ return "[[!pagetemplate ".gettext("failed to process")." $@]]";
}
$template->param(name => $page);