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

a specific id is a specific id, no matter the chan

parent 01f19655
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -84,32 +84,14 @@ sub _test_if_exists {
my $sth;
# in query, we don't check chan
# this means that a user can indicate any id in query
if ($chan =~ /^#/) {
$sth = $dbh->prepare('
SELECT content
FROM playbot_chan
WHERE content = ?
AND chan = ?
LIMIT 1
');
$sth->execute($index, $chan)
or $log->error("Couldn't finish transaction: " . $dbh->errstr);
} else {
$sth = $dbh->prepare('
SELECT content
FROM playbot_chan
WHERE content = ?
LIMIT 1
');
$sth->execute($index)
or $log->error("Couldn't finish transaction: " . $dbh->errstr);
}
$sth = $dbh->prepare('
SELECT content
FROM playbot_chan
WHERE content = ?
LIMIT 1
');
$sth->execute($index, $chan)
$sth->execute($index)
or $log->error("Couldn't finish transaction: " . $dbh->errstr);
my $content = $sth->fetch;
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter