summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 6d3b6c606..ba2c09c36 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1086,14 +1086,16 @@ sub htmllink ($$$;@) {
$bestlink=htmlpage($bestlink);
if (! $destsources{$bestlink}) {
- return $linktext unless length $config{cgiurl};
- return "<span class=\"createlink\"><a href=\"".
+ my $cgilink = "";
+ if (length $config{cgiurl}) {
+ $cgilink = "<a href=\"".
cgiurl(
do => "create",
page => lc($link),
from => $lpage
- ).
- "\" rel=\"nofollow\">?</a>$linktext</span>"
+ )."\" rel=\"nofollow\">?</a>";
+ }
+ return "<span class=\"createlink\">$cgilink$linktext</span>"
}
}