From 472c15da3a0645f67bc59c4f9629b5c7430cc8a2 Mon Sep 17 00:00:00 2001 From: oranges Date: Mon, 2 Jul 2018 02:28:59 +0000 Subject: [PATCH] SDQL where filter message is now correct Previously when no where filter was used it would incorrectly use the filtered count when reporting what objects were executed against, this lead to admins erroneously assuming that the where clause was required --- code/modules/admin/verbs/SDQL2/SDQL_2.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index a19ab3c1006..54af4b5167b 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -54,6 +54,7 @@ return var/list/refs = list() + var/where_used = FALSE for(var/list/query_tree in querys) var/list/from_objs = list() var/list/select_types = list() @@ -82,6 +83,7 @@ objs_all = objs.len if("where" in query_tree) + where_used = TRUE var/objs_temp = objs objs = list() for(var/datum/d in objs_temp) @@ -119,7 +121,7 @@ var/end_time = REALTIMEOFDAY end_time -= start_time return list("SDQL query results: [query_text]",\ - "SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.",\ + "SDQL query completed: [objs_all] objects selected by path, and [where_used ? objs_eligible : objs_all] objects executed on after WHERE filtering if applicable.",\ "SDQL query took [DisplayTimeText(end_time)] to complete.") + refs /proc/SDQL_qdel_datum(datum/d)