X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/77136538788350ad2decaa445704ba5738074736..17f01c3237dd9a91ccb4bbc3ec13d75dc17285a0:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 90fedca4f..91d2e6082 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -120,7 +120,7 @@ sub getsetup () { #{{{ }, default_plugins => { type => "internal", - default => [qw{mdwn link inline htmlscrubber passwordauth + default => [qw{mdwn link inline meta htmlscrubber passwordauth openid signinedit lockedit conditional recentchanges parentlinks editpage}], description => "plugins to enable by default", @@ -655,19 +655,8 @@ sub newpagefile ($$) { #{{{ sub targetpage ($$) { #{{{ my $page=shift; my $ext=shift; - - my $targetpage=''; - run_hooks(targetpage => sub { - $targetpage=shift->( - page => $page, - ext => $ext, - ); - }); - - if (defined $targetpage && (length($targetpage) > 0)) { - return $targetpage; - } - elsif (! $config{usedirs} || $page eq 'index') { + + if (! $config{usedirs} || $page eq 'index') { return $page.".".$ext; } else { @@ -815,7 +804,6 @@ sub will_render ($$;$) { #{{{ sub bestlink ($$) { #{{{ my $page=shift; my $link=shift; - my $res=undef; my $cwd=$page; if ($link=~s/^\/+//) { @@ -830,35 +818,25 @@ sub bestlink ($$) { #{{{ $l.=$link; if (exists $links{$l}) { - $res=$l; + return $l; } elsif (exists $pagecase{lc $l}) { - $res=$pagecase{lc $l}; + return $pagecase{lc $l}; } - } while ($cwd=~s{/?[^/]+$}{} && ! defined $res); + } while $cwd=~s{/?[^/]+$}{}; - if (! defined $res && length $config{userdir}) { + if (length $config{userdir}) { my $l = "$config{userdir}/".lc($link); if (exists $links{$l}) { - $res=$l; + return $l; } elsif (exists $pagecase{lc $l}) { - $res=$pagecase{lc $l}; + return $pagecase{lc $l}; } } - if (defined $res) { - run_hooks(tweakbestlink => sub { - $res=shift->( - page => $page, - link => $res); - }); - return $res; - } - else { - #print STDERR "warning: page $page, broken link: $link\n"; - return ""; - } + #print STDERR "warning: page $page, broken link: $link\n"; + return ""; } #}}} sub isinlinableimage ($) { #{{{ @@ -953,10 +931,6 @@ sub beautify_urlpath ($) { #{{{ $url =~ s!/index.$config{htmlext}$!/!; } - run_hooks(tweakurlpath => sub { - $url=shift->(url => $url); - }); - # Ensure url is not an empty link, and # if it's relative, make that explicit to avoid colon confusion. if ($url !~ /^\//) {