fix backlink new change detection code
authorJoey Hess <joey@gnu.kitenet.net>
Wed, 7 Oct 2009 18:08:03 +0000 (14:08 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Wed, 7 Oct 2009 18:08:03 +0000 (14:08 -0400)
IkiWiki/Render.pm

index e28381c3332b848d442ffe943ad0fd86f5b141f6..79935f32393f9dddb225f989784597dacb3c47f8 100644 (file)
@@ -494,7 +494,7 @@ sub calculate_changed_links ($$$) {
                                my $target=bestlink($page, $l);
                                if (! exists $oldlink_targets->{$page}{$l} ||
                                    $target ne $oldlink_targets->{$page}{$l}) {
-                                       $backlinkchanged{$l}=1;
+                                       $backlinkchanged{$target}=1;
                                        $linkchangers{lc($page)}=1;
                                }
                                delete $oldlink_targets->{$page}{$l};
@@ -502,7 +502,7 @@ sub calculate_changed_links ($$$) {
                }
                if (exists $oldlink_targets->{$page} &&
                    %{$oldlink_targets->{$page}}) {
-                       foreach my $target (keys %{$oldlink_targets->{$page}}) {
+                       foreach my $target (values %{$oldlink_targets->{$page}}) {
                                $backlinkchanged{$target}=1;
                        }
                        $linkchangers{lc($page)}=1;