Commit d2c6e3fc authored by Ronan's avatar Ronan

fix(MainDb): remote static qualifier of query in getEventCount

parent c5cfbc58
......@@ -783,12 +783,12 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
soci::session *session = dbSession.getBackendSession<soci::session>();
const int &state = static_cast<int>(chatMessage->getState());
const string &imdnMessageId = chatMessage->getImdnMessageId();
*session << "UPDATE conference_chat_message_event SET state = :state, imdn_message_id = :imdnMessageId WHERE event_id = :eventId",
*session << "UPDATE conference_chat_message_event SET state = :state, imdn_message_id = :imdnMessageId"
" WHERE event_id = :eventId",
soci::use(state), soci::use(imdnMessageId), soci::use(eventId);
//TODO: improve
deleteContents(eventId);
for (const Content *content : chatMessage->getContents())
for (const auto &content : chatMessage->getContents())
insertContent(eventId, *content);
}
......@@ -1433,7 +1433,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
return 0;
}
static string query = "SELECT COUNT(*) FROM event" +
string query = "SELECT COUNT(*) FROM event" +
buildSqlEventFilter({ ConferenceCallFilter, ConferenceChatMessageFilter, ConferenceInfoFilter }, mask);
int count = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment