M #-: Sort hooks by execution id (#1262)

This commit is contained in:
Pavel Czerný authored and GitHub committed 2021-05-31 17:55:27 +02:00
1 parent 87a7c595d5
commit 6a4417c4a7
1 file changed
+3 -5
+3 -5
View File
@@ -57,11 +57,7 @@ int HookLog::_dump_log(int hkid, int exec_id, std::string &xml_log)
cmd << "SELECT body FROM "<< one_db::hook_log_table;
if ( hkid == -1 )
{
cmd << " ORDER BY hkid DESC";
}
else
if ( hkid != -1 )
{
cmd << " WHERE hkid = " << hkid;
}
@@ -71,6 +67,8 @@ int HookLog::_dump_log(int hkid, int exec_id, std::string &xml_log)
cmd << " AND exeid = " << exec_id;
}
cmd << " ORDER BY hkid DESC, exeid";
xml_log.append("<HOOKLOG>");
cb.set_callback(&xml_log);