fix removal of staged attachments

master
Joey Hess 2011-06-15 17:46:08 -04:00
parent b66261d08b
commit 00c0677588
1 changed files with 5 additions and 5 deletions

View File

@ -119,17 +119,17 @@ sub removal_confirm ($$@) {
my @pages=@_;
# Special case for unsaved attachments.
@pages=grep {
foreach my $page (@pages) {
if (IkiWiki::Plugin::attachment->can("is_held_attachment")) {
my $f=IkiWiki::Plugin::attachment::is_held_attachment($_);
my $f=IkiWiki::Plugin::attachment::is_held_attachment($page);
if (defined $f) {
print STDERR "!! remove $f\n";
require IkiWiki::Render;
IkiWiki::prune($f);
0;
}
}
1;
} @pages;
}
@pages=grep { exists $pagesources{$_} } @pages;
return unless @pages;
foreach my $page (@pages) {