summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-10 22:18:26 +0000
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-11 21:14:05 +0000
commit6a986a8a0bd20e82e128ce7e0aa9587437ae8325 (patch)
tree0f5305e39e73652790358a10af2624814379d73e /IkiWiki/Plugin
parent1d696aef2c6b364b55070b15dcc7084d0b09daaf (diff)
Remove dead code for preprocessing [[!comments]]
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm59
1 files changed, 0 insertions, 59 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 8b82341c0..73f8d6140 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -16,7 +16,6 @@ use constant CANCEL => "Cancel";
sub import { #{{{
hook(type => "checkconfig", id => 'comments', call => \&checkconfig);
hook(type => "getsetup", id => 'comments', call => \&getsetup);
- hook(type => "preprocess", id => 'comments', call => \&preprocess);
hook(type => "sessioncgi", id => 'comment', call => \&sessioncgi);
hook(type => "htmlize", id => "_comment", call => \&htmlize);
hook(type => "pagetemplate", id => "comments", call => \&pagetemplate);
@@ -91,64 +90,6 @@ sub checkconfig () { #{{{
unless defined $config{comments_pagename};
} #}}}
-# Somewhat based on IkiWiki::Plugin::inline blog posting support
-sub preprocess (@) { #{{{
- my %params=@_;
-
- return "";
-
- my $page = $params{page};
- $pagestate{$page}{comments}{comments} = defined $params{closed}
- ? (not IkiWiki::yesno($params{closed}))
- : 1;
- $pagestate{$page}{comments}{allowdirectives} = IkiWiki::yesno($params{allowdirectives});
- $pagestate{$page}{comments}{commit} = defined $params{commit}
- ? IkiWiki::yesno($params{commit})
- : 1;
-
- my $formtemplate = IkiWiki::template("comments_embed.tmpl",
- blind_cache => 1);
- $formtemplate->param(cgiurl => $config{cgiurl});
- $formtemplate->param(page => $params{page});
-
- if (not $pagestate{$page}{comments}{comments}) {
- $formtemplate->param("disabled" =>
- gettext('comments are closed'));
- }
- elsif ($params{preview}) {
- $formtemplate->param("disabled" =>
- gettext('not available during Preview'));
- }
-
- debug("page $params{page} => destpage $params{destpage}");
-
- unless (defined $params{inline} && !IkiWiki::yesno($params{inline})) {
- my $posts = '';
- eval q{use IkiWiki::Plugin::inline};
- error($@) if ($@);
- my @args = (
- pages => "internal($params{page}/_comment_*)",
- template => "comments_display",
- show => 0,
- reverse => "yes",
- # special stuff passed through
- page => $params{page},
- destpage => $params{destpage},
- preview => $params{preview},
- );
- push @args, atom => $params{atom} if defined $params{atom};
- push @args, rss => $params{rss} if defined $params{rss};
- push @args, feeds => $params{feeds} if defined $params{feeds};
- push @args, feedshow => $params{feedshow} if defined $params{feedshow};
- push @args, timeformat => $params{timeformat} if defined $params{timeformat};
- push @args, feedonly => $params{feedonly} if defined $params{feedonly};
- $posts = IkiWiki::preprocess_inline(@args);
- $formtemplate->param("comments" => $posts);
- }
-
- return $formtemplate->output;
-} # }}}
-
# FIXME: logic taken from editpage, should be common code?
sub getcgiuser ($) { # {{{
my $session = shift;