Changeset 5c7119d


Ignore:
Timestamp:
06/24/11 17:39:10 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
8bdf2d3
Parents:
496685d
Message:

Fixed bug reported by gregor: Too many authors are shown (form other conferences as well).

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • BUGS

    r496685d r5c7119d  
    33
    44-------------------------------------------------------------------
    5 BugId: 1
     5BugID: 1
    66Title: Persons are not deleted when deleting a conference.
    77Status: Fixed.
    88-------------------------------------------------------------------
    9 BugId: 2
     9BugID: 2
    1010Title: SQL injections possible.
    1111Status: Fixed.
     
    2121Status:
    2222-------------------------------------------------------------------
     23BugID 5
     24Title: Too many authors are shown (from other conferences).
     25Severity: major
     26Status: Fixed.
     27-------------------------------------------------------------------
  • src/mvc/event.cpp

    r496685d r5c7119d  
    158158    {
    159159        QSqlQuery query;
    160         // TODO: conference ID isn't used here
    161         query.prepare("SELECT person.name FROM person INNER JOIN event_person ON person.id = event_person.xid_person AND event_person.xid_event = :id AND event_person.xid_conference = :conf");
     160        query.prepare("SELECT person.name FROM person INNER JOIN event_person ON person.id = event_person.xid_person AND event_person.xid_event = :id AND event_person.xid_conference = :conf1 AND person.xid_conference = :conf2");
    162161        query.bindValue(":id", id());
    163         query.bindValue(":conf", conferenceId());
    164         query.exec();
    165         // TODO: handle qeury error
    166         //qDebug() << query.lastError();
     162        query.bindValue(":conf1", conferenceId());
     163        query.bindValue(":conf2", conferenceId());
     164        if (!query.exec())  qDebug() << query.lastError();
    167165
    168166        while(query.next())
     
    227225    QString strQuery = QString("SELECT %1 FROM EVENT INNER JOIN SEARCH_EVENT USING (xid_conference, id) ").arg(columnsForSelect());
    228226    strQuery += QString("WHERE xid_conference = :conf AND start >= :start AND start < :end ORDER BY %1").arg(orderBy);
    229     //qDebug() << strQuery;
     227
    230228    QList<Event> list;
    231229    QSqlQuery query;
Note: See TracChangeset for help on using the changeset viewer.