]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge remote branch 'upstream/filter-full' into prv/po
authorintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:04:59 +0000 (11:04 +0200)
committerintrigeri <intrigeri@boum.org>
Sun, 11 Jul 2010 09:04:59 +0000 (11:04 +0200)
1  2 
IkiWiki/Plugin/comments.pm

index f0eec9ace54ca4dc06fe74c866034f84c0bc8388,64eb7fb093fce0d8dbb1d8437f829f5c4aa31b6d..851f4862eb3a5a39bb0afb387b35dfc60262024d
@@@ -22,7 -22,6 +22,7 @@@ sub import 
        hook(type => "checkconfig", id => 'comments',  call => \&checkconfig);
        hook(type => "getsetup", id => 'comments',  call => \&getsetup);
        hook(type => "preprocess", id => 'comment', call => \&preprocess);
 +      hook(type => "preprocess", id => 'commentmoderation', call => \&preprocess_moderation);
        # here for backwards compatability with old comments
        hook(type => "preprocess", id => '_comment', call => \&preprocess);
        hook(type => "sessioncgi", id => 'comment', call => \&sessioncgi);
@@@ -143,8 -142,6 +143,6 @@@ sub preprocess 
        }
        $content =~ s/\\"/"/g;
  
-       $content = IkiWiki::filter($page, $params{destpage}, $content);
        if ($config{comments_allowdirectives}) {
                $content = IkiWiki::preprocess($page, $params{destpage},
                        $content);
        return $content;
  }
  
 +sub preprocess_moderation {
 +      my %params = @_;
 +
 +      $params{desc}=gettext("Comment Moderation")
 +              unless defined $params{desc};
 +
 +      if (length $config{cgiurl}) {
 +              return '<a href="'.
 +                      IkiWiki::cgiurl(do => 'commentmoderation').
 +                      '">'.$params{desc}.'</a>';
 +      }
 +      else {
 +              return $params{desc};
 +      }
 +}
 +
  sub sessioncgi ($$) {
        my $cgi=shift;
        my $session=shift;
@@@ -586,7 -567,6 +584,7 @@@ sub commentmoderation ($$) 
                my $added=0;
                foreach my $id (keys %vars) {
                        if ($id =~ /(.*)\._comment(?:_pending)?$/) {
 +                              $id=decode_utf8($id);
                                my $action=$cgi->param($id);
                                next if $action eq 'Defer' && ! $rejectalldefer;