From 7029f98bc735efcec08213d51bdec2c6645d682d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 2 Jan 2013 19:17:16 +0000 Subject: [PATCH] trail: remove excess presence-dependencies Since trail members are explicitly rebuilt if the information used for their prev/up/next boxes changes, they don't need another dependency on the trail itself. (If the trail disappears, it will disappear from the member's member_to_trails entry, causing a rebuild; so the add_depends is redundant.) Similarly, since trail members are explicitly rebuilt if their next or previous item, or its title, changes, the presence dependencies on the next and previous items are redundant. --- IkiWiki/Plugin/trail.pm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/IkiWiki/Plugin/trail.pm b/IkiWiki/Plugin/trail.pm index b1bb6d5b5..cb94855fd 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]; } @@ -438,13 +436,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); } -- 2.32.0.93.g670b81a890