From: joey Date: Wed, 15 Mar 2006 02:45:33 +0000 (+0000) Subject: sometims I hate perl X-Git-Tag: 1.0~361 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2d1989983e8978f024bbb8fdd0e68445913c0a8e;p=ikiwiki.git sometims I hate perl This fixes the bug that made it not update pages linking to a new page --- diff --git a/ikiwiki b/ikiwiki index ad3e06b3f..72b4ab771 100755 --- a/ikiwiki +++ b/ikiwiki @@ -639,8 +639,7 @@ FILE: foreach my $file (@files) { foreach my $file (keys %rendered, @del) { my $page=pagename($file); if (exists $links{$page}) { - foreach my $link (@{$links{$page}}) { - $link=bestlink($page, $link); + foreach my $link (map { bestlink($page, $_) } @{$links{$page}}) { if (length $link && ! exists $oldlinks{$page} || ! grep { $_ eq $link } @{$oldlinks{$page}}) { @@ -649,8 +648,7 @@ FILE: foreach my $file (@files) { } } if (exists $oldlinks{$page}) { - foreach my $link (@{$oldlinks{$page}}) { - $link=bestlink($page, $link); + foreach my $link (map { bestlink($page, $_) } @{$oldlinks{$page}}) { if (length $link && ! exists $links{$page} || ! grep { $_ eq $link } @{$links{$page}}) {