projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bf21d2
)
rename: remove duplicates that hook functions may have added to @torename
author
intrigeri
<intrigeri@boum.org>
Sun, 8 Mar 2009 14:47:50 +0000
(15:47 +0100)
committer
intrigeri
<intrigeri@boum.org>
Sun, 8 Mar 2009 14:47:50 +0000
(15:47 +0100)
Signed-off-by: intrigeri <intrigeri@boum.org>
IkiWiki/Plugin/rename.pm
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/rename.pm
b/IkiWiki/Plugin/rename.pm
index 38cebdba50d6e0c4a58376f0738c3df44a031103..d3ca8bd3a4b585d67b6792207bc1a89f76ade3e0 100644
(file)
--- a/
IkiWiki/Plugin/rename.pm
+++ b/
IkiWiki/Plugin/rename.pm
@@
-318,8
+318,14
@@
sub sessioncgi ($$) {
cgi => $q,
session => $session,
);
- # FIXME: remove duplicates (based on src or srcfile key)
- # from @torename
+
+ # 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};