]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge commit 'intrigeri/pedigree'
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 16 Jul 2008 21:31:15 +0000 (17:31 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 16 Jul 2008 21:31:15 +0000 (17:31 -0400)
1  2 
IkiWiki.pm

diff --combined IkiWiki.pm
index 80e31711062694fb9494306e5900df4ca54f8b2f,bcbbabbe0587f105b43b4dc83cd0ae3a025ae7bd..6a1823c5a940461ab8cf8ad5952a889323713bbf
@@@ -77,7 -77,8 +77,8 @@@ sub defaultconfig () { #{{
        adminuser => undef,
        adminemail => undef,
        plugin => [qw{mdwn link inline htmlscrubber passwordauth openid
-                       signinedit lockedit conditional recentchanges}],
+                       signinedit lockedit conditional recentchanges
+                       parentlinks}],
        libdir => undef,
        timeformat => '%c',
        locale => undef,
@@@ -768,30 -769,21 +769,30 @@@ sub preprocess ($$$;$$) { #{{
                        }
                        my $ret;
                        if (! $scan) {
 -                              $ret=$hooks{preprocess}{$command}{call}->(
 -                                      @params,
 -                                      page => $page,
 -                                      destpage => $destpage,
 -                                      preview => $preprocess_preview,
 -                              );
 +                              $ret=eval {
 +                                      $hooks{preprocess}{$command}{call}->(
 +                                              @params,
 +                                              page => $page,
 +                                              destpage => $destpage,
 +                                              preview => $preprocess_preview,
 +                                      );
 +                              };
 +                              if ($@) {
 +                                      chomp $@;
 +                                      $ret="[[!$command <span class=\"error\">".
 +                                              gettext("Error").": $@"."</span>]]";
 +                              }
                        }
                        else {
                                # use void context during scan pass
 -                              $hooks{preprocess}{$command}{call}->(
 -                                      @params,
 -                                      page => $page,
 -                                      destpage => $destpage,
 -                                      preview => $preprocess_preview,
 -                              );
 +                              eval {
 +                                      $hooks{preprocess}{$command}{call}->(
 +                                              @params,
 +                                              page => $page,
 +                                              destpage => $destpage,
 +                                              preview => $preprocess_preview,
 +                                      );
 +                              };
                                $ret="";
                        }
                        $preprocessing{$page}--;