Skip to content
Extraits de code Groupes Projets
Valider 84c95ae5 rédigé par Alexandre Morignot's avatar Alexandre Morignot
Parcourir les fichiers

Data structure modifications

The date and the sender_irc are attached to the channel, not the
content.
parent d2150f47
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -62,11 +62,11 @@ sub parse { ...@@ -62,11 +62,11 @@ sub parse {
else { else {
# insertion de la vidéo dans la bdd # insertion de la vidéo dans la bdd
my $sth = $dbh->prepare_cached(' my $sth = $dbh->prepare_cached('
INSERT INTO playbot (date, type, url, sender_irc, sender, title) INSERT INTO playbot (type, url, sender, title)
VALUES (NOW(),?,?,?,?,?)'); VALUES (?,?,?,?)');
$log->error("Couldn't prepare querie; aborting") unless (defined $sth); $log->error("Couldn't prepare querie; aborting") unless (defined $sth);
$sth->execute($content{'site'}, $content{'url'}, $nick, $content{'author'}, $content{'title'}) $sth->execute($content{'site'}, $content{'url'}, $content{'author'}, $content{'title'})
or $log->error("Couldn't finish transaction: " . $dbh->errstr); or $log->error("Couldn't finish transaction: " . $dbh->errstr);
} }
...@@ -92,11 +92,11 @@ sub parse { ...@@ -92,11 +92,11 @@ sub parse {
# insertion du chan # insertion du chan
my $sth = $dbh->prepare_cached(' my $sth = $dbh->prepare_cached('
INSERT INTO playbot_chan (content, chan) INSERT INTO playbot_chan (content, chan, sender_irc)
VALUES (?,?)'); VALUES (?,?,?)');
$log->error("Couldn't prepare querie; aborting") unless (defined $sth); $log->error("Couldn't prepare querie; aborting") unless (defined $sth);
$sth->execute($id, $chan->[0]) $sth->execute($id, $chan->[0], $nick)
or $log->error("Couldn't finish transaction: " . $dbh->errstr); or $log->error("Couldn't finish transaction: " . $dbh->errstr);
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter