]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Take advantage of having changed commentdate().
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Sun, 28 Dec 2014 03:45:27 +0000 (22:45 -0500)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Sun, 28 Dec 2014 03:45:27 +0000 (22:45 -0500)
ikiwiki-comment.in

index c742d7063fa89fc2de6358db06f64ae19bb5cd89..eb22d6c0dee58af6ac97d74b609da34471585d03 100755 (executable)
@@ -31,7 +31,7 @@ sub main {
                $format         ||= 'mdwn';
                $username       ||= get_username();
                $subject        ||= get_subject($page, $dir);
-               $date           ||= get_date();
+               $date           ||= IkiWiki::Plugin::comments::commentdate();
        } else {
                $format         ||= undef;
                die "must supply username" unless defined $username;
@@ -80,13 +80,6 @@ sub get_subject {
        return "comment $comment_num";
 }
 
-sub get_date {
-       my $date = IkiWiki::Plugin::comments::commentdate();
-       $date =~ s|^date=\\"||;
-       $date =~ s|\\"$||;
-       return $date;
-}
-
 sub get_comment {
        my ($format, $username, $subject, $date, $content) = @_;
        $format = defined $format ? $format = " format=$format" : q{};