-if (exists $ENV{EDITOR}) {
- @editor=split(' ', $ENV{EDITOR});
+
+sub get_comment {
+ my ($format, $username, $subject, $date, $url, $email, $ip, $content) = @_;
+ $format = defined $format ? $format = " format=$format" : q{};
+ $content = '' unless defined $content;
+ my $comment="[[!comment$format\n";
+ $comment.=" username=\"$username\"\n";
+ $comment.=" subject=\"\"\"$subject\"\"\"\n";
+ $comment.=" date=\"$date\"\n";
+ $comment.=" url=\"$url\"\n" if defined $url;
+ $comment.=" email=\"$email\"\n" if defined $email;
+ $comment.=" ip=\"$ip\"\n" if defined $ip;
+ $comment.=" content=\"\"\"\n$content\n\"\"\"]]\n";
+ return $comment;