diff options
author | intrigeri <intrigeri@boum.org> | 2009-01-01 18:04:37 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-01-01 18:04:37 +0100 |
commit | e895157397c4602359f8612e4ce9964bcabc8928 (patch) | |
tree | c9735a94cf8be8b02f1228c8596bac48cfdbfc78 /IkiWiki/Plugin/po.pm | |
parent | 131d2d4e7cac6bfa634fd7d356095733a64e0fd8 (diff) | |
download | ikiwiki-e895157397c4602359f8612e4ce9964bcabc8928.tar ikiwiki-e895157397c4602359f8612e4ce9964bcabc8928.tar.gz |
Pass src, srcfile, dest and destfile to the canrename hook.
This is not needed by the use I'm doing of it, but seems more consistent to me.
Future users of this hook may need this data to make their mind.
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index cb48aaf0d..c0c7557e4 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -432,11 +432,12 @@ sub canremove ($$$) { return undef; } -sub canrename ($$$) { - my ($page, $cgi, $session) = (shift, shift, shift); +sub canrename ($$@) { + my ($cgi, $session) = (shift, shift); + my %params = @_; - if (istranslation($page)) { - my $masterpage = masterpage($page); + if (istranslation($params{src})) { + my $masterpage = masterpage($params{src}); # Tell the difference between: # - a translation being renamed as a consequence of its master page # being renamed, which is allowed |