Fix invalid notification_id in DB IDO query

fixes #8976
This commit is contained in:
Michael Friedrich 2015-12-15 11:55:21 +01:00 committed by Gunnar Beutner
parent 2f8d416da0
commit 36c170d5dc
2 changed files with 16 additions and 10 deletions

View File

@ -682,13 +682,16 @@ bool IdoMysqlConnection::FieldToEscapedString(const String& key, const Value& va
if (key == "instance_id") {
*result = static_cast<long>(m_InstanceID);
return true;
}
if (key == "session_token") {
} else if (key == "session_token") {
*result = m_SessionToken;
return true;
}
if (key == "notification_id") {
*result = static_cast<long>(GetNotificationInsertID(value));
} else if (key == "notification_id") {
DbReference ref = GetNotificationInsertID(value);
if (!ref.IsValid())
return false;
*result = static_cast<long>(ref);
return true;
}

View File

@ -565,13 +565,16 @@ bool IdoPgsqlConnection::FieldToEscapedString(const String& key, const Value& va
if (key == "instance_id") {
*result = static_cast<long>(m_InstanceID);
return true;
}
if (key == "session_token") {
} else if (key == "session_token") {
*result = m_SessionToken;
return true;
}
if (key == "notification_id") {
*result = static_cast<long>(GetNotificationInsertID(value));
} else if (key == "notification_id") {
DbReference ref = GetNotificationInsertID(value);
if (!ref.IsValid())
return false;
*result = static_cast<long>(ref);
return true;
}