]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
add plugin section, and show which plugins need no configuration
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index 6340fc2cb466bd925208d8bf21462ff5f12b4466..caed0d58c5e05fedc70a7a480a5247e728c83b69 100644 (file)
@@ -171,9 +171,8 @@ sub preprocess {
                else {
                        $commentauthorurl = IkiWiki::cgiurl(
                                do => 'goto',
-                               page => (length $config{userdir}
-                                       ? "$config{userdir}/$commentuser"
-                                       : "$commentuser"));
+                               page => IkiWiki::userpage($commentuser)
+                       );
 
                        $commentauthor = $commentuser;
                }
@@ -224,7 +223,7 @@ sub preprocess {
                $pagestate{$page}{meta}{title} = $params{subject};
        }
 
-       if ($params{page} =~ m/\/(\Q$config{comments_pagename}\E\d+)$/) {
+       if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
                $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page}), undef, 1).
                        "#".page_to_id($params{page});
        }