X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/5c2f6cb8935f828274511ba5ca0d92b586632740..88c6e2891593fd508701d728602515e47284180c:/IkiWiki/Plugin/link.pm

diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm
index 48691d973..4c1add985 100644
--- a/IkiWiki/Plugin/link.pm
+++ b/IkiWiki/Plugin/link.pm
@@ -12,7 +12,7 @@ sub import {
 	hook(type => "checkconfig", id => "link", call => \&checkconfig);
 	hook(type => "linkify", id => "link", call => \&linkify);
 	hook(type => "scan", id => "link", call => \&scan);
-	hook(type => "renamelink", id => "link", call => \&renamelink);
+	hook(type => "renamepage", id => "link", call => \&renamepage);
 }
 
 sub getsetup () {
@@ -86,11 +86,11 @@ sub scan (@) {
 	my $content=$params{content};
 
 	while ($content =~ /(?<!\\)$link_regexp/g) {
-		push @{$links{$page}}, linkpage($2);
+		add_link($page, linkpage($2));
 	}
 }
 
-sub renamelink (@) {
+sub renamepage (@) {
 	my %params=@_;
 	my $page=$params{page};
 	my $old=$params{oldpage};