projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f64c69
)
cgiurl: don't append "?" if there are no parameters
author
Simon McVittie
<smcv@debian.org>
Mon, 22 Nov 2010 23:16:59 +0000
(23:16 +0000)
committer
Simon McVittie
<smcv@debian.org>
Mon, 22 Nov 2010 23:16:59 +0000
(23:16 +0000)
This means we can use cgiurl() instead of $config{cgiurl} if an absolute
URL isn't desired.
IkiWiki.pm
patch
|
blob
|
history
diff --git
a/IkiWiki.pm
b/IkiWiki.pm
index 1d37e7f8eec96551254c3b86d101092b71e8609b..989f3bee7ca47b427f8ba68806db3c80a0117589 100644
(file)
--- a/
IkiWiki.pm
+++ b/
IkiWiki.pm
@@
-1044,6
+1044,11
@@
sub cgiurl (@) {
$cgiurl=$params{cgiurl};
delete $params{cgiurl};
}
+
+ unless (%params) {
+ return $cgiurl;
+ }
+
return $cgiurl."?".
join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params);
}