session => $session,
);
- # remove duplicates from @torename
- my %seen=();
- my @uniq_torename;
- foreach my $item (@torename) {
- push(@uniq_torename, $item) unless $seen{$item->{src}}++;
- }
- @torename=@uniq_torename;
-
require IkiWiki::Render;
IkiWiki::disable_commit_hook() if $config{rcs};
my %origpagesources=%pagesources;
cgi => $q,
session => $session,
);
- return @torename;
+
+ # remove duplicates from @torename
+ my %seen;
+ return grep { ! $seen{$_->{src}}++ } @torename;
}
else {
return ();
}
}
-
+
sub do_rename ($$$) {
my $rename=shift;
my $q=shift;