From 0ff14796e784856e98b43c3d60780cb74d9d6fa4 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:03:15 +0200 Subject: [PATCH] [MIRROR] Fixes weird blank in Watchlist Update Messages when adding a expiration date [MDB IGNORE] (#16252) * Fixes weird blank in Watchlist Update Messages when adding a expiration date (#69897) When you add a watchlist expiration date without having previously set one, the logged message should now be more clear as to this. * Fixes weird blank in Watchlist Update Messages when adding a expiration date Co-authored-by: san7890 --- code/modules/admin/sql_message_system.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/sql_message_system.dm b/code/modules/admin/sql_message_system.dm index f9d22595c95..4a89d434fdf 100644 --- a/code/modules/admin/sql_message_system.dm +++ b/code/modules/admin/sql_message_system.dm @@ -254,7 +254,7 @@ return new_expiry = query_validate_expire_time_edit.item[1] qdel(query_validate_expire_time_edit) - var/edit_text = "Expiration time edited by [editor_key] on [SQLtime()] from [old_expiry] to [new_expiry]
" + var/edit_text = "Expiration time edited by [editor_key] on [SQLtime()] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]
" var/datum/db_query/query_edit_message_expiry = SSdbcore.NewQuery({" UPDATE [format_table_name("messages")] SET expire_timestamp = :expire_time, lasteditor = :lasteditor, edits = CONCAT(IFNULL(edits,''),:edit_text) @@ -265,8 +265,8 @@ qdel(query_find_edit_expiry_message) return qdel(query_edit_message_expiry) - log_admin_private("[kn] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [old_expiry] to [new_expiry]") - message_admins("[kna] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [old_expiry] to [new_expiry]") + log_admin_private("[kn] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]") + message_admins("[kna] has edited the expiration time of a [type] [(type == "note" || type == "message" || type == "watchlist entry") ? " for [target_key]" : ""] made by [admin_key] from [(old_expiry ? old_expiry : "no expiration date")] to [new_expiry]") if(browse) browse_messages("[type]") else