]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/link.pm
attachment: Fix reversion in attachment sorting by age.
[git.ikiwiki.info.git] / IkiWiki / Plugin / link.pm
index 48691d97363881d2a70e210364e8fd76abb2eede..4c1add9853a3b4053f34b8d927e52ea0e7e4d1f4 100644 (file)
@@ -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};