aboutsummaryrefslogtreecommitdiff
path: root/doc/bugs/opendiscussion_should_respect_the_discussion_option
diff options
context:
space:
mode:
authorhttps://id.mayfirst.org/jamie <https://id.mayfirst.org/jamie@web>2012-07-29 17:56:50 -0400
committeradmin <admin@branchable.com>2012-07-29 17:56:50 -0400
commit2b422ece0360c82fd5c33fad7fce591fff84f84b (patch)
tree5b58a97488800ff86d03fc1f82671a181188bb2c /doc/bugs/opendiscussion_should_respect_the_discussion_option
parenta9171be0184c65939f39c8319b416c00b0ffd466 (diff)
downloadikiwiki-2b422ece0360c82fd5c33fad7fce591fff84f84b.tar
ikiwiki-2b422ece0360c82fd5c33fad7fce591fff84f84b.tar.gz
Diffstat (limited to 'doc/bugs/opendiscussion_should_respect_the_discussion_option')
-rw-r--r--doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn b/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn
new file mode 100644
index 000000000..a5c951671
--- /dev/null
+++ b/doc/bugs/opendiscussion_should_respect_the_discussion_option/discussion.mdwn
@@ -0,0 +1,26 @@
+This would be great to see fixed. It's perplexing to have discussion => 0 in my configuration, not have any discussion links on my site, but still be able to add a discussion page by URL hacking something like this: /cgi-bin/ikiwiki/ikiwiki.cgi?page=posts%2Fdiscussion&do=edit.
+
+spammers have figured that little trick out so I am consitently getting spammed checked into my git repository.
+
+I'm not really sure if this patch introduced other problems, but it seems to have fixed my site:
+
+ 0 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$ diff -u /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm opendiscussion.pm
+ --- /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm 2012-05-07 11:31:24.000000000 -0400
+ +++ opendiscussion.pm 2012-07-29 17:49:28.000000000 -0400
+ @@ -25,7 +25,7 @@
+ my $cgi=shift;
+ my $session=shift;
+
+ - return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i;
+ + return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i && $config{discussion};
+ return "" if pagespec_match($page, "postcomment(*)");
+ return undef;
+ }
+ 1 mcclelland@chavez:~/.ikiwiki/IkiWiki/Plugin$
+
+If libdir is configured to be ~/.ikiwiki in your ikiwiki.settings file, and you are running Debian, you can do the following:
+
+ mkdir -p ~/.ikiwiki/IkiWiki/Plugin
+ cp /usr/share/perl5/IkiWiki/Plugin/opendiscussion.pm ~/.ikiwiki/IkiWiki/Plugin/
+
+And then apply the patch above to ~/.ikiwiki/Ikiwiki/Plugin/opendiscussion.pm.