summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2009-01-01 01:14:06 +0100
committerintrigeri <intrigeri@boum.org>2009-01-01 01:14:06 +0100
commit5412a95fd00017fb95037140393b864d38e2be0b (patch)
tree1ad3ec021ee7fb1a9be7034a91e9afc9e37bdd3c /IkiWiki
parent37b8822762ba8a2096adae18997e406023deddf3 (diff)
po(myurlto): more robust run_by_editpage logic
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 77439a3ca..205066341 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -483,7 +483,9 @@ sub myurlto ($$;$) {
# avoid, i.e. when po_link_to = negotiated
if ($config{po_link_to} eq "negotiated") {
my @caller = caller(1);
- my $run_by_editpage = ($caller[3] eq "IkiWiki::cgi_editpage");
+ my $run_by_editpage = 0;
+ $run_by_editpage = 1 if (exists $caller[3] && defined $caller[3]
+ && $caller[3] eq "IkiWiki::cgi_editpage");
inject(name => "IkiWiki::beautify_urlpath", call => $origsubs{'beautify_urlpath'})
if $run_by_editpage;
my $res = $origsubs{'urlto'}->($to,$from,$absolute);