X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/912521ef0711204965aa2319d41c7741bd3f4f4c..3f3f3e46ad7890ba8ee7d1aeb51757424b534175:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index faca32835..5b78014d1 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -129,6 +129,8 @@ sub loadplugins () { #{{{ sub loadplugin ($) { #{{{ my $plugin=shift; + return if grep { $_ eq $plugin} @{$config{disable_plugins}}; + my $mod="IkiWiki::Plugin::".possibly_foolish_untaint($plugin); eval qq{use $mod}; if ($@) { @@ -317,6 +319,10 @@ sub bestlink ($$) { #{{{ } } while $cwd=~s!/?[^/]+$!!; + if (length $config{userdir} && exists $links{"$config{userdir}/".lc($link)}) { + return "$config{userdir}/".lc($link); + } + #print STDERR "warning: page $page, broken link: $link\n"; return ""; } #}}} @@ -511,6 +517,10 @@ sub preprocess ($$$;$) { #{{{ if ($preprocessing{$page}++ > 3) { # Avoid loops of preprocessed pages preprocessing # other pages that preprocess them, etc. + #translators: The first parameter is a + #translators: preprocessor directive name, + #translators: the second a page name, the + #translators: third a number. return "[[".sprintf(gettext("%s preprocessing loop detected on %s at depth %i"), $command, $page, $preprocessing{$page}). "]]";