Merge branch 'master' into autotag

master
Joey Hess 2010-04-21 14:21:40 -04:00
commit 0fcbcc4815
2 changed files with 15 additions and 8 deletions

View File

@ -1087,14 +1087,16 @@ sub htmllink ($$$;@) {
$bestlink=htmlpage($bestlink);
if (! $destsources{$bestlink}) {
return $linktext unless length $config{cgiurl};
return "<span class=\"createlink\"><a href=\"".
cgiurl(
do => "create",
page => lc($link),
from => $lpage
).
"\" rel=\"nofollow\">?</a>$linktext</span>"
my $cgilink = "";
if (length $config{cgiurl}) {
$cgilink = "<a href=\"".
cgiurl(
do => "create",
page => lc($link),
from => $lpage
)."\" rel=\"nofollow\">?</a>";
}
return "<span class=\"createlink\">$cgilink$linktext</span>"
}
}

View File

@ -0,0 +1,5 @@
When the CGI URL is not defined, links to missing pages appear as plain, unstyled text. I think the 'createlink' span should always wrap this text, even when the actual question mark linking to the CGI for the create action is missing. This ensures consistent styling regardless of whether the CGI is available or not (and is thus useful for example when the same wiki has clones with the CGI link and clones without).
A proposed patch is available [on my ikiwiki clone](http://git.oblomov.eu/ikiwiki/patch/290d1b498f00f63e6d41218ddb76d87e68ed5081)
[[!tag patch cgi done]]