Browse Source

* CMTD::Helpers->comment_add

master
Alex 'AdUser' Z 7 years ago
parent
commit
bca8306d16
  1. 4
      lib/CMTD/Helpers.pm

4
lib/CMTD/Helpers.pm

@ -125,10 +125,10 @@ sub register {
my ($c, $pid, $cm) = @_;
my $table = 'comments';
$c->app->db->begin;
my $seq = $c->app->db->select($table, 'max(seq)', {pid => $pid})->list;
my $seq = $c->app->db->select($table, 'max(seq)', {pid => $pid})->list || 0;
$c->app->db->insert($table, {
pid => $pid,
seq => $seq,
seq => $seq + 1,
date => time(),
name => $cm->{name},
reply => $cm->{reply},

Loading…
Cancel
Save