comments: use global configuration for allow_directives, commit, and pagename
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 23 Nov 2008 17:07:58 +0000 (17:07 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 21:14:04 +0000 (21:14 +0000)
IkiWiki/Plugin/comments.pm

index 892b4af266fd9da09feed75f769f03738e0e5321..80469f503b4a8689cfcdba770f1ccb5a266b332f 100644 (file)
@@ -220,10 +220,9 @@ sub sessioncgi ($$) { #{{{
                error(gettext("bad page name"));
        }
 
-       my $allow_directives = $pagestate{$page}{comments}{allowdirectives};
-       my $commit_comments = defined $pagestate{$page}{comments}{commit}
-               ? $pagestate{$page}{comments}{commit}
-               : 1;
+       my $allow_directives = $config{comments_allowdirectives};
+       my $commit_comments = $config{comments_commit};
+       my $comments_pagename = $config{comments_pagename};
 
        # FIXME: is this right? Or should we be using the candidate subpage
        # (whatever that might mean) as the base URL?