summaryrefslogtreecommitdiff
path: root/ikiwiki
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-14 06:04:44 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-03-14 06:04:44 +0000
commit7f8efe4524fb8cc2066e07c4f9fbad3b14fbccfb (patch)
treef892b786f07206ecd29f7de73efa10f27dd13ea4 /ikiwiki
parent2885278ebd2e2bfad188a583d7ad5d3c8b7c3a21 (diff)
fix Discussion links to not take the BestLink.
As a bonus we now have meta Disussion/Discussion pages available, etc. Oh well.. :-)
Diffstat (limited to 'ikiwiki')
-rwxr-xr-xikiwiki17
1 files changed, 9 insertions, 8 deletions
diff --git a/ikiwiki b/ikiwiki
index d6057c101..53a86c1ed 100755
--- a/ikiwiki
+++ b/ikiwiki
@@ -210,9 +210,15 @@ sub htmllink { #{{{
my $page=shift;
my $link=shift;
my $noimageinline=shift; # don't turn links into inline html images
- my $createsubpage=shift; # force creation of a subpage if page DNE
+ my $forcesubpage=shift; # force a link to a subpage
- my $bestlink=bestlink($page, $link);
+ my $bestlink;
+ if (! $forcesubpage) {
+ $bestlink=bestlink($page, $link);
+ }
+ else {
+ $bestlink="$page/".lc($link);
+ }
return $link if length $bestlink && $page eq $bestlink;
@@ -224,12 +230,7 @@ sub htmllink { #{{{
$bestlink=htmlpage($bestlink);
}
if (! grep { $_ eq $bestlink } values %renderedfiles) {
- if (! $createsubpage) {
- return "<a href=\"$config{cgiurl}?do=create&page=$link&from=$page\">?</a>$link"
- }
- else {
- return "<a href=\"$config{cgiurl}?do=create&page=$page/$link\">?</a>$link"
- }
+ return "<a href=\"$config{cgiurl}?do=create&page=$link&from=$page\">?</a>$link"
}
$bestlink=File::Spec->abs2rel($bestlink, dirname($page));