From: Giuseppe Bilotta Date: Tue, 20 Apr 2010 22:16:32 +0000 (+0200) Subject: Always give createlink class to links to nonexistent pages X-Git-Tag: 3.20100427~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0fa25a361cbb49711938599d6cf06201ce0cc79a;p=ikiwiki.git Always give createlink class to links to nonexistent pages With this change, the with class createlink is always created around the link text, even when no CGI URL is defined. This allows styling of these 'links' in this case too. The same class is used as when CGI URL is defined so that e.g. clones of the same ikiwiki, one with CGI and one without, display in the same way (modulo the missing question mark link). (cherry picked from commit 290d1b498f00f63e6d41218ddb76d87e68ed5081) --- 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 " "create", page => lc($link), from => $lpage - ). - "\" rel=\"nofollow\">?$linktext" + )."\" rel=\"nofollow\">?"; + } + return "$cgilink$linktext" } }