Persons are deleted now when a conference is removed.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 22 Jun 2011 21:07:29 +0000 (21:07 +0000)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Wed, 22 Jun 2011 21:07:29 +0000 (21:07 +0000)
BUGS
src/sql/sqlengine.cpp

diff --git a/BUGS b/BUGS
index 4a4ba56..befad2c 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -4,7 +4,9 @@ We don't have a bug tracking system yet, therefore this file contains known bugs
 -------------------------------------------------------------------
 BugId: 1
 Title: Persons are not deleted when deleting a conference.
+Status: Fixed.
 -------------------------------------------------------------------
 BugId: 2
 Title: SQL injections possible.
+Status: 
 -------------------------------------------------------------------
index c214218..9b2948b 100644 (file)
@@ -348,9 +348,10 @@ void SqlEngine::deleteConference(int id)
     execQueryWithParameter(db, "DELETE FROM EVENT_ROOM WHERE xid_conference = :xid_conference", params);
     execQueryWithParameter(db, "DELETE FROM EVENT_PERSON WHERE xid_conference = :xid_conference", params);
     execQueryWithParameter(db, "DELETE FROM EVENT WHERE xid_conference = :xid_conference", params);
+    execQueryWithParameter(db, "DELETE FROM ROOM WHERE xid_conference = :xid_conference", params);
+    execQueryWithParameter(db, "DELETE FROM PERSON WHERE xid_conference = :xid_conference", params);
+    execQueryWithParameter(db, "DELETE FROM TRACK WHERE xid_conference = :xid_conference", params);
     execQueryWithParameter(db, "DELETE FROM CONFERENCE WHERE id = :xid_conference", params);
-    execQuery(db, "DELETE FROM ROOM WHERE NOT EXISTS(SELECT * FROM EVENT_ROOM WHERE xid_room = ROOM.id)");
-    execQuery(db, "DELETE FROM PERSON WHERE NOT EXISTS(SELECT * FROM EVENT_PERSON WHERE xid_person = PERSON.id)");
 
     commitTransaction();
 }