inline: base feed names on the included page name
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 5 Dec 2010 20:17:11 +0000 (21:17 +0100)
committerJoey Hess <joey@kitenet.net>
Sun, 5 Dec 2010 20:34:11 +0000 (16:34 -0400)
Use the included page name rather than the including page name. This
allows us to allow feeds in nested inlines without duplicating feeds
with the same content under different (and stupid) names.

IkiWiki/Plugin/inline.pm

index 76527156406159e381164835b4c1dc3015cb346f..b58c8780b0ef24637ebe98845b1cdc3b4b4b2739 100644 (file)
@@ -160,7 +160,7 @@ sub preprocess_inline (@) {
        my $rss=(($config{rss} || $config{allowrss}) && exists $params{rss}) ? yesno($params{rss}) : $config{rss};
        my $atom=(($config{atom} || $config{allowatom}) && exists $params{atom}) ? yesno($params{atom}) : $config{atom};
        my $quick=exists $params{quick} ? yesno($params{quick}) : 0;
-       my $feeds=! $nested && (exists $params{feeds} ? yesno($params{feeds}) : !$quick && ! $raw);
+       my $feeds=exists $params{feeds} ? yesno($params{feeds}) : !$quick && ! $raw;
        my $emptyfeeds=exists $params{emptyfeeds} ? yesno($params{emptyfeeds}) : 1;
        my $feedonly=yesno($params{feedonly});
        if (! exists $params{show} && ! $archive) {
@@ -269,7 +269,7 @@ sub preprocess_inline (@) {
                        }
                        $params{feedfile}=possibly_foolish_untaint($params{feedfile});
                }
-               $feedbase=targetpage($params{destpage}, "", $params{feedfile});
+               $feedbase=targetpage($params{page}, "", $params{feedfile});
 
                my $feedid=join("\0", $feedbase, map { $_."\0".$params{$_} } sort keys %params);
                if (exists $knownfeeds{$feedid}) {