From: David Bremner Date: Fri, 26 Sep 2008 17:05:29 +0000 (-0300) Subject: fix inlining bug X-Git-Tag: 0.3~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4f72aa7e2d78ee74b416ef27b90245ff48f0d1e2;p=ikiwiki.git fix inlining bug --- diff --git a/IkiWiki/Plugin/postal.pm b/IkiWiki/Plugin/postal.pm index 125d35111..8eb0542e2 100644 --- a/IkiWiki/Plugin/postal.pm +++ b/IkiWiki/Plugin/postal.pm @@ -48,7 +48,7 @@ sub pagetemplate (@) my $subpage_name=$config{postal_pagename} || "comments"; - my $comment_page=$destpage . "/" . $subpage_name; + my $comment_page=$page . "/" . $subpage_name; add_depends($params{page},$comment_page); @@ -61,7 +61,9 @@ sub pagetemplate (@) } my $comment_link=undef; +# debug("pagesources{$comment_page}=$pagesources{$comment_page}\n"); if (exists $pagesources{$comment_page}){ +# debug("looking for htmlink $page $destpage $comment_page\n"); $comment_link=htmllink($page,$destpage,$comment_page, linktext=>gettext("Read Comments")); } diff --git a/filters/iki-address-test.pl b/filters/iki-address-test.pl index 289aaf615..813157cb8 100644 --- a/filters/iki-address-test.pl +++ b/filters/iki-address-test.pl @@ -1,19 +1,20 @@ #!/usr/bin/perl -use Mail::Internet; -use Convert::YText 'decode_ytext'; +use lib ".."; +use strict; +use Email::Filter; +use Convert::YText qw(decode_ytext); my $prefix="-comment-"; -my $mail = Mail::Internet->new([<>]); +my $message=Email::Filter->new(); -my $to = $mail->get('To:'); +$message->exit(0); # do not exit after delivery -if ($to =~ m/$prefix([A-Za-z0-9\.\+\=\-_\~]+)\@/){ - my $key=$1; - my $page=decode_ytext($key); - $mail->replace('X-IkiWiki-Page:',$page); -} +my $to=$message->to; +if ($to =~ m/$prefix($Convert::YText::valid_rex)/){ + my $page=decode_ytext($1); -$mail->print(\*STDOUT); + print STDERR "page=$page"; +} diff --git a/filters/postal-accept.pl b/filters/postal-accept.pl index 1c14758f1..f49ac174d 100644 --- a/filters/postal-accept.pl +++ b/filters/postal-accept.pl @@ -49,12 +49,14 @@ if ($to =~ m/$prefix($Convert::YText::valid_rex)/){ chdir $config{srcdir} || die ("chdir $config{srcdir}: $!"); my $comments_folder=$page."/comments".$folder_ext; - + my $comments_page=$page."/comments"; # write the message to the comment $message->accept($comments_folder) || die("delivery failed"); debug("delivered to $comments_folder\n"); + + IkiWiki::add_depends($page,$comments_page); # update vcs, copied from Ikiwiki::Plugins::attachment if ($config{rcs}) {