* Don't put discussion links on discussion pages.

master
joey 2006-12-29 04:45:09 +00:00
parent ef165d652e
commit 178ab4c51c
4 changed files with 8 additions and 4 deletions

View File

@ -157,7 +157,9 @@ sub preprocess_inline (@) { #{{{
if ($actions) {
my $file = $pagesources{$page};
my $type = pagetype($file);
if ($config{discussion} && (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
if ($config{discussion} &&
$page !~ /.*\/discussion$/ &&
(length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
$template->param(have_actions => 1);
$template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
}

View File

@ -93,7 +93,8 @@ sub genpage ($$$) { #{{{
$template->param(historyurl => $u);
$actions++;
}
if ($config{discussion} && (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
if ($config{discussion} && $page !~ /.*\/discussion$/ &&
(length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
$template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), 1, 1));
$actions++;
}

3
debian/changelog vendored
View File

@ -17,8 +17,9 @@ ikiwiki (1.37) UNRELEASED; urgency=low
* Initial work on internationalization of the program code. po/ikiwiki.pot
is available for translation.
* Export gettext() from IkiWiki module.
* Don't put discussion links on discussion pages.
-- Joey Hess <joeyh@debian.org> Thu, 28 Dec 2006 17:13:43 -0500
-- Joey Hess <joeyh@debian.org> Thu, 28 Dec 2006 23:40:57 -0500
ikiwiki (1.36) unstable; urgency=low

View File

@ -4,4 +4,4 @@ I do want discussion subpage, but I don't want to have, for example: discussion/
-- [[JeremyReed]]
> Discussion pages should clearly be a special case that don't get Discussion
> links put at the top. --[[Joey]]
> links put at the top... aaand.. [[done]]! --[[Joey]]