X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/7b06a65221ae16bf447c591dba5712c1d9f00461..8bc02b1a10950c3bbb19757aa7368a94017dab54:/IkiWiki/Plugin/trail.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/trail.pm b/IkiWiki/Plugin/trail.pm index b1bb6d5b5..d5fb2b5d6 100644 --- a/IkiWiki/Plugin/trail.pm +++ b/IkiWiki/Plugin/trail.pm @@ -344,8 +344,6 @@ sub prerender { $prev = $members->[$i - 1] if $i > 0; my $next = $members->[$i + 1]; - add_depends($member, $trail, deptype("presence")); - $member_to_trails{$member}{$trail} = [$prev, $next]; } @@ -413,6 +411,8 @@ sub pagetemplate (@) { my $page = $params{page}; my $template = $params{template}; + return unless length $page; + if ($template->query(name => 'trails') && ! $recursive) { prerender(); @@ -438,13 +438,11 @@ sub pagetemplate (@) { my ($prevurl, $nexturl, $prevtitle, $nexttitle); if (defined $prev) { - add_depends($params{destpage}, $prev, deptype("presence")); $prevurl = urlto($prev, $page); $prevtitle = title_of($prev); } if (defined $next) { - add_depends($params{destpage}, $next, deptype("presence")); $nexturl = urlto($next, $page); $nexttitle = title_of($next); }