]> sipb.mit.edu Git - ikiwiki.git/commitdiff
sometims I hate perl
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 15 Mar 2006 02:45:33 +0000 (02:45 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Wed, 15 Mar 2006 02:45:33 +0000 (02:45 +0000)
This fixes the bug that made it not update pages linking to a new page

ikiwiki

diff --git a/ikiwiki b/ikiwiki
index ad3e06b3fca2ae884e339d0cc0ef228791f03d05..72b4ab77192cb4248739e1cadbc9775cdb03256c 100755 (executable)
--- 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}}) {