X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bc7381c4f9f76cbef6bef27cc382a8246b58a4f7..812f775e0a3cd953782edcbe8a0eb727752df03f:/IkiWiki/Plugin/listdirectives.pm

diff --git a/IkiWiki/Plugin/listdirectives.pm b/IkiWiki/Plugin/listdirectives.pm
index 6f8ddb06a..2ab3e4665 100644
--- a/IkiWiki/Plugin/listdirectives.pm
+++ b/IkiWiki/Plugin/listdirectives.pm
@@ -30,7 +30,7 @@ sub getsetup () { #{{{
 } #}}}
 
 my @fulllist;
-my @earlylist;
+my @shortlist;
 my $pluginstring;
 
 sub checkconfig () { #{{{
@@ -40,15 +40,14 @@ sub checkconfig () { #{{{
 	else {
 		$config{directive_description_dir} =~ s/\/+$//;
 	}
-
-	@earlylist = sort keys %{$IkiWiki::hooks{preprocess}};
 } #}}}
 
 sub needsbuild (@) { #{{{
 	my $needsbuild=shift;
 
 	@fulllist = sort keys %{$IkiWiki::hooks{preprocess}};
-	$pluginstring = join(' ', @earlylist) . " : " . join(' ', @fulllist);
+	@shortlist = grep { ! $IkiWiki::hooks{preprocess}{$_}{shortcut} } @fulllist;
+	$pluginstring = join(' ', @shortlist) . " : " . join(' ', @fulllist);
 
 	foreach my $page (keys %pagestate) {
 		if (exists $pagestate{$page}{listdirectives}{shown}) {
@@ -77,14 +76,14 @@ sub preprocess (@) { #{{{
 		@pluginlist = @fulllist;
 	}
 	else {
-		@pluginlist = @earlylist;
+		@pluginlist = @shortlist;
 	}
 	
 	my $result = '<ul class="listdirectives">';
 	
 	foreach my $plugin (@pluginlist) {
 		$result .= '<li class="listdirectives">';
-		my $link=IkiWiki::linkpage($config{directive_description_dir}."/".$plugin);
+		my $link=linkpage($config{directive_description_dir}."/".$plugin);
 		add_depends($params{page}, $link);
 		$result .= htmllink($params{page}, $params{destpage}, $link);
 		$result .= '</li>';