diff options
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r-- | IkiWiki/Render.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index bed9cb777..5cb67ea07 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -24,13 +24,19 @@ sub calculate_backlinks () { $backlinks_calculated=1; } -sub backlinks ($) { +sub backlink_pages ($) { my $page=shift; calculate_backlinks(); + return keys %{$backlinks{$page}}; +} + +sub backlinks ($) { + my $page=shift; + my @links; - foreach my $p (keys %{$backlinks{$page}}) { + foreach my $p (backlink_pages($page)) { my $href=urlto($p, $page); # Trim common dir prefixes from both pages. |