]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/edittemplate.pm
web commit by XTaran: Changed case of repo link since hgweb seems to be pickier about...
[git.ikiwiki.info.git] / IkiWiki / Plugin / edittemplate.pm
index aa72b08457616c98e1bba6ce658a2beedc1b00b6..76c1cd42aed37b24ff3f313a50c0d49cd4112aa7 100644 (file)
@@ -21,7 +21,8 @@ sub needsbuild (@) { #{{{
 
        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
@@ -37,10 +38,10 @@ sub preprocess (@) { #{{{
        return "" if $params{page} ne $params{destpage};
 
        if (! exists $params{template} || ! length($params{template})) {
-               return return "[[meta ".gettext("template not specified")."]]";
+               return "[[meta ".gettext("template not specified")."]]";
        }
        if (! exists $params{match} || ! length($params{match})) {
-               return return "[[meta ".gettext("match not specified")."]]";
+               return "[[meta ".gettext("match not specified")."]]";
        }
 
        $pagestate{$params{page}}{edittemplate}{$params{match}}=$params{template};