- @pages=grep {
- if (IkiWiki::Plugin::attachment->can("is_held_attachment")) {
- my $f=IkiWiki::Plugin::attachment::is_held_attachment($_);
+ foreach my $page (@pages) {
+ if ($attachment && IkiWiki::Plugin::attachment->can("is_held_attachment")) {
+ my $f=IkiWiki::Plugin::attachment::is_held_attachment($page);