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.master
parent
ed67ff3b84
commit
7dd074e2e7
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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 <joeyh@debian.org> Fri, 25 Dec 2009 14:31:22 -0500
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue