From 91c868e907a8694ebb7e7d7758189fc54425ab03 Mon Sep 17 00:00:00 2001 From: Michal Vaner Date: Tue, 2 Sep 2008 01:02:27 +0200 Subject: [PATCH] Fix error - all notifications were recursive --- PciIds/DBQ.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PciIds/DBQ.pm b/PciIds/DBQ.pm index c6de46c..99472a1 100644 --- a/PciIds/DBQ.pm +++ b/PciIds/DBQ.pm @@ -57,9 +57,9 @@ sub new( $ ) { 'notifdata' => 'SELECT recursive, type, notification FROM notifications WHERE user = ? AND location = ?', 'drop-notif' => 'DELETE FROM notifications WHERE user = ? AND location = ?', 'new-notif' => 'INSERT INTO notifications (user, location, recursive, type, notification) VALUES (?, ?, ?, ?, ?)', - 'notify' => 'INSERT INTO pending (user, history, notification, reason) SELECT DISTINCT user, ?, ?, ? FROM notifications WHERE ( notification = 2 OR notification = ? ) AND type <= ? AND ( location = ? OR ( SUBSTR( ?, 1, LENGTH( location ) ) = location ) )', - 'newtime-mail' => 'UPDATE users SET nextmail = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * mailgather ) WHERE nextmail < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 0 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', - 'newtime-xmpp' => 'UPDATE users SET nextxmpp = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * xmppgather ) WHERE nextxmpp < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 1 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', + 'notify' => 'INSERT INTO pending (user, history, notification, reason) SELECT DISTINCT user, ?, ?, ? FROM notifications WHERE ( notification = 2 OR notification = ? ) AND type <= ? AND ( location = ? OR ( recursive = 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) )', + 'newtime-mail' => 'UPDATE users SET nextmail = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * mailgather ) WHERE nextmail < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 0 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( recursive = 1 AND SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', + 'newtime-xmpp' => 'UPDATE users SET nextxmpp = FROM_UNIXTIME( UNIX_TIMESTAMP( NOW() ) + 60 * xmppgather ) WHERE nextxmpp < NOW() AND EXISTS ( SELECT 1 FROM notifications WHERE ( notification = 1 OR notification = 2 ) AND type <= ? AND ( location = ? OR ( recursive = 1 SUBSTR( ?, 1, LENGTH( location ) ) = location ) ) )', 'mailout' => 'SELECT pending.user, users.email, pending.reason, history.discussion, history.nodename, history.nodenote, history.time, -- 2.39.5