]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
comments: Remove ipv6 address specific code.
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index 0d5e3c078a9c229b409950c1e65eb1affa3787ac..c00bf52752e9326a3ffc40855ed8b130dced74ce 100644 (file)
@@ -443,10 +443,7 @@ sub editcomment ($$) {
                $content .= " nickname=\"$nickname\"\n";
        }
        elsif (defined $session->remote_addr()) {
                $content .= " nickname=\"$nickname\"\n";
        }
        elsif (defined $session->remote_addr()) {
-               my $ip = $session->remote_addr();
-               if ($ip =~ m/^([.0-9]+)$/) {
-                       $content .= " ip=\"$1\"\n";
-               }
+               $content .= " ip=\"".$session->remote_addr()."\"\n";
        }
 
        if ($config{comments_allowauthor}) {
        }
 
        if ($config{comments_allowauthor}) {
@@ -665,9 +662,11 @@ sub commentmoderation ($$) {
 
                                my $page=IkiWiki::dirname($f);
                                my $file="$config{srcdir}/$f";
 
                                my $page=IkiWiki::dirname($f);
                                my $file="$config{srcdir}/$f";
+                               my $filedir=$config{srcdir};
                                if (! -e $file) {
                                        # old location
                                        $file="$config{wikistatedir}/comments_pending/".$f;
                                if (! -e $file) {
                                        # old location
                                        $file="$config{wikistatedir}/comments_pending/".$f;
+                                       $filedir="$config{wikistatedir}/comments_pending";
                                }
 
                                if ($action eq 'Accept') {
                                }
 
                                if ($action eq 'Accept') {
@@ -682,7 +681,7 @@ sub commentmoderation ($$) {
                                }
 
                                require IkiWiki::Render;
                                }
 
                                require IkiWiki::Render;
-                               IkiWiki::prune($file);
+                               IkiWiki::prune($file, $filedir);
                        }
                }
 
                        }
                }