summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2b1bc9c)
Problem is that by the time rendering calls render_dependent, %pagesources
has had deleted files removed from it. So match_comment's lookup of
files in there to see if they had the _comment extension failed.
I had to introduce a hash that temporarily holds filenames of deleted pages
to fix this.
Note that unlike comment(), internal() had avoided this pitfall by being
defined to match both internal and non-internal pages.
use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
%pagestate %wikistate %renderedfiles %oldrenderedfiles
use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase
%pagestate %wikistate %renderedfiles %oldrenderedfiles
- %pagesources %destsources %depends %depends_simple @mass_depends
- %hooks %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks
- %autofiles};
+ %pagesources %delpagesources %destsources %depends %depends_simple
+ @mass_depends %hooks %forcerebuild %loaded_plugins %typedlinks
+ %oldtypedlinks %autofiles};
use Exporter q{import};
our @EXPORT = qw(hook debug error htmlpage template template_depends
use Exporter q{import};
our @EXPORT = qw(hook debug error htmlpage template template_depends
my $page = shift;
my $glob = shift;
my $page = shift;
my $glob = shift;
- if (! IkiWiki::isinternal($page)) {
- return IkiWiki::FailReason->new("$page is not a comment");
- }
- my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
+ # To see if it's a comment, check the source file type.
+ # Deal with comments that were just deleted.
+ my $source=exists $IkiWiki::pagesources{$page} ?
+ $IkiWiki::pagesources{$page} :
+ $IkiWiki::delpagesources{$page};
+ my $type=IkiWiki::pagetype($source);
if (defined $type && $type ne "_comment") {
return IkiWiki::FailReason->new("$page is not a comment");
}
if (defined $type && $type ne "_comment") {
return IkiWiki::FailReason->new("$page is not a comment");
}
my $page = shift;
my $glob = shift;
my $page = shift;
my $glob = shift;
- if (! IkiWiki::isinternal($page)) {
- return IkiWiki::FailReason->new("$page is not a pending comment");
- }
- my $type=IkiWiki::pagetype($IkiWiki::pagesources{$page});
+ my $source=exists $IkiWiki::pagesources{$page} ?
+ $IkiWiki::pagesources{$page} :
+ $IkiWiki::delpagesources{$page};
+ my $type=IkiWiki::pagetype($source);
if (defined $type && $type ne "_comment_pending") {
return IkiWiki::FailReason->new("$page is not a pending comment");
}
if (defined $type && $type ne "_comment_pending") {
return IkiWiki::FailReason->new("$page is not a pending comment");
}
}
delete $pagecase{lc $page};
}
delete $pagecase{lc $page};
+ $delpagesources{$page}=$pagesources{$page};
delete $pagesources{$page};
}
}
delete $pagesources{$page};
}
}
* page.tmpl: Accidentially broke po plugin's otherlanguages list styling
when modifying for html5; now fixed.
* page.tmpl: Accidentially broke po plugin's otherlanguages list styling
when modifying for html5; now fixed.
+ * Fix a bug that prevented matching deleted comments, and so did not update
+ pages that had contained them.
-- Joey Hess <joeyh@debian.org> Sun, 16 May 2010 00:03:06 -0400
-- Joey Hess <joeyh@debian.org> Sun, 16 May 2010 00:03:06 -0400