From: Joey Hess Date: Sat, 2 Jan 2010 20:42:20 +0000 (-0500) Subject: Fix several places that did not properly handle capitalization of the discussionpage... X-Git-Tag: 3.20100102.3~2 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/7dd074e2e712c67c8c1a26841a69281fa9d293cb?ds=sidebyside Fix several places that did not properly handle capitalization of the discussionpage setting. Specifically, fixes discussion actions on discussion pages, and unbreaks the opendiscussion plugin. --- diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 17d1611db..ec99300b3 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -357,9 +357,9 @@ sub preprocess_inline (@) { my $file = $pagesources{$page}; my $type = pagetype($file); if ($config{discussion}) { - if ($page !~ /.*\/\Q$config{discussionpage}\E$/ && + if ($page !~ /.*\/\Q$config{discussionpage}\E$/i && (length $config{cgiurl} || - exists $pagesources{$page."/".$config{discussionpage}})) { + exists $pagesources{$page."/".lc($config{discussionpage})})) { $template->param(have_actions => 1); $template->param(discussionlink => htmllink($page, diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 1bec4b013..4517ff88b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -23,7 +23,7 @@ sub canedit ($$) { my $cgi=shift; my $session=shift; - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/; + return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; return undef; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 308d60ed0..c82d8a35a 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -92,7 +92,7 @@ sub genpage ($$) { $actions++; } if ($config{discussion}) { - if ($page !~ /.*\/\Q$config{discussionpage}\E$/ && + if ($page !~ /.*\/\Q$config{discussionpage}\E$/i && (length $config{cgiurl} || exists $links{$page."/".$config{discussionpage}})) { $template->param(discussionlink => htmllink($page, $page, $config{discussionpage}, noimageinline => 1, forcesubpage => 1)); diff --git a/debian/changelog b/debian/changelog index 4ad346c13..bccb8b797 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,6 @@ -ikiwiki (3.20091219) UNRELEASED; urgency=low +ikiwiki (3.20100102.3) UNRELEASED; urgency=low + + Happy palindrome day! * pagestats: Add show parameter. Closes: #562129 (David Paleino) * toc: Add startlevel parameter. (kerravonsen) @@ -14,6 +16,9 @@ ikiwiki (3.20091219) UNRELEASED; urgency=low * linkmap: Add option to omit disconnected pages from the map. * inline: Fix bug that limited displayed pages when feedshow was specified w/o show. + * Fix several places that did not properly handle capitalization of + the discussionpage setting. Specifically, fixes discussion actions + on discussion pages, and unbreaks the opendiscussion plugin. -- Joey Hess Fri, 25 Dec 2009 14:31:22 -0500 diff --git a/doc/bugs/disable_sub-discussion_pages.mdwn b/doc/bugs/disable_sub-discussion_pages.mdwn index 233a377f1..39d9ba528 100644 --- a/doc/bugs/disable_sub-discussion_pages.mdwn +++ b/doc/bugs/disable_sub-discussion_pages.mdwn @@ -9,6 +9,9 @@ I do want discussion subpage, but I don't want to have, for example: discussion/ >> This bug appears to have returned. For example, >> [[plugins/contrib/unixauth/discussion]] has a Discussion link. -- [[schmonz]] +>>> Lots of case issues this time. Audited for and fixed them all. [[done]] +>>> --[[Joey]] + >>> Joey, I've just seen that you closed that bug in ikiwiki 1.37, but it seems >>> you fixed it only for English "discussion" page. The bug still occurs >>> for the international "discussion" pages. I have backported ikiwiki 1.40