]> sipb.mit.edu Git - ikiwiki.git/commitdiff
preview shouldn't show the feed buttons or post form
authorJoey Hess <joey@kodama.kitenet.net>
Mon, 4 Feb 2008 23:44:54 +0000 (18:44 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Mon, 4 Feb 2008 23:44:54 +0000 (18:44 -0500)
IkiWiki/Plugin/inline.pm

index e2be5640e72ef425d49ae44901aeace7908e3409..d58c655c53559ffece5b8e4f09a4fcf45efe1ede 100644 (file)
@@ -183,7 +183,7 @@ sub preprocess_inline (@) { #{{{
        my $atomurl=basename(atompage($params{destpage}).$feednum) if $feeds && $atom;
        my $ret="";
 
-       if ($config{cgiurl} && (exists $params{rootpage} ||
+       if ($config{cgiurl} && ! $params{preview} && (exists $params{rootpage} ||
                        (exists $params{postform} && yesno($params{postform})))) {
                # Add a blog post form, with feed buttons.
                my $formtemplate=template("blogpost.tmpl", blind_cache => 1);
@@ -202,7 +202,7 @@ sub preprocess_inline (@) { #{{{
                }
                $ret.=$formtemplate->output;
        }
-       elsif ($feeds) {
+       elsif ($feeds && !$params{preview}) {
                # Add feed buttons.
                my $linktemplate=template("feedlink.tmpl", blind_cache => 1);
                $linktemplate->param(rssurl => $rssurl) if $rss;