commentプラグインで挿入する文字列に日付を付加しないオプションnodateを指定しても日付が挿入されてしまう
sf.jp上の1.34および1.42で確認。orgではnodateが正しく働く。以下、修正案。
+ $now_format = ($post['nodate']=='1') ? '' : COMMENT_NOW_FORMAT ; - if ($post['nodate']=='1') { - $comment_format = str_replace('$now','',$comment_format); - } $postdata = ''; $postdata_old = get_source($post['refer']); $comment_no = 0; $name = ''; if ($post['name'] != '') { $name = str_replace('$name',$post['name'],COMMENT_NAME_FORMAT); } $head = ''; if (preg_match('/^(-{1,2})(.*)/',$post['msg'],$match)) { $head = $match[1]; $post['msg'] = $match[2]; } $comment = str_replace("\x08MSG\x08",str_replace('$msg',$post['msg'],COMMENT_MSG_FORMAT),$comment_format); $comment = str_replace("\x08NAME\x08",$name,$comment); + $comment = str_replace("\x08NOW\x08",str_replace('$now',$now,$now_format),$comment); - $comment = str_replace("\x08NOW\x08",str_replace('$now',$now,COMMENT_NOW_FORMAT),$comment); $comment = $head.$comment;