From: Florent Bruneau Date: Mon, 12 Jan 2009 08:35:35 +0000 (+0100) Subject: Fix SQL error in watch_nonins. X-Git-Tag: xorg/0.10.1~49^2~25 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=88e31f350c4b03041672ddb68463f71d858454e0;p=platal.git Fix SQL error in watch_nonins. This is not a really fix, it only ignores the error (the entry is added twice). Signed-off-by: Florent Bruneau --- diff --git a/include/notifs.inc.php b/include/notifs.inc.php index d48f010..8427bf9 100644 --- a/include/notifs.inc.php +++ b/include/notifs.inc.php @@ -446,7 +446,7 @@ class NoninsNotifs public function add($p) { - XDB::execute('INSERT INTO watch_nonins (uid,ni_id) VALUES({?},{?})', $this->_uid, $p); + XDB::execute('INSERT IGNORE INTO watch_nonins (uid,ni_id) VALUES({?},{?})', $this->_uid, $p); $res = XDB::query('SELECT prenom,IF(nom_usage="",nom,nom_usage) AS nom,promo,user_id FROM auth_user_md5 WHERE user_id={?}', $p);