]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
* Only try postsignin if no other action matched. Fixes a bug where the
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 3a03b554aeb60bf13637bc0d9bbfb441980d0608..53b051816740db8a2448ac76c04192e887843eb1 100644 (file)
@@ -14,7 +14,7 @@ my %page_numfeeds;
 sub import { #{{{
        hook(type => "getopt", id => "inline", call => \&getopt);
        hook(type => "checkconfig", id => "inline", call => \&checkconfig);
-       hook(type => "sessioncgi", id => "skeleton", call => \&sessioncgi);
+       hook(type => "sessioncgi", id => "inline", call => \&sessioncgi);
        hook(type => "preprocess", id => "inline", 
                call => \&IkiWiki::preprocess_inline);
        hook(type => "pagetemplate", id => "inline",
@@ -161,7 +161,9 @@ sub preprocess_inline (@) { #{{{
        }
        else {
                if (exists $page_numfeeds{$params{destpage}}) {
-                       $feednum=$knownfeeds{$feedid}=++$page_numfeeds{$params{destpage}};
+                       if ($feeds) {
+                               $feednum=$knownfeeds{$feedid}=++$page_numfeeds{$params{destpage}};
+                       }
                }
                else {
                        $feednum=$knownfeeds{$feedid}="";
@@ -171,8 +173,8 @@ sub preprocess_inline (@) { #{{{
                }
        }
 
-       my $rssurl=basename(rsspage($params{destpage}).$feednum);
-       my $atomurl=basename(atompage($params{destpage}).$feednum);
+       my $rssurl=basename(rsspage($params{destpage}).$feednum) if $feeds && $rss;
+       my $atomurl=basename(atompage($params{destpage}).$feednum) if $feeds && $atom;
        my $ret="";
 
        if ($config{cgiurl} && (exists $params{rootpage} ||