From ef2bd157c965895c6eb9f1ae05ab872607d6fa90 Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 10 Sep 2021 23:09:06 +0100 Subject: [PATCH 1/4] note deletion confirmation --- code/modules/admin/topic.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index d9510a4defb..8476f92eec2 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -982,7 +982,9 @@ else if(href_list["removenote"]) var/note_id = href_list["removenote"] - remove_note(note_id) + if(note_id) + if((alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes") && note_id) + remove_note(note_id) else if(href_list["editnote"]) var/note_id = href_list["editnote"] From 24176b4e0054e9444ae4e8bef731290cea138d24 Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 10 Sep 2021 23:22:01 +0100 Subject: [PATCH 2/4] okay we know the note ID is here somewhere --- code/modules/admin/topic.dm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 8476f92eec2..f3804f86c50 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -982,9 +982,8 @@ else if(href_list["removenote"]) var/note_id = href_list["removenote"] - if(note_id) - if((alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes") && note_id) - remove_note(note_id) + if((alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes")) + remove_note(note_id) else if(href_list["editnote"]) var/note_id = href_list["editnote"] From fa09fc3a5d70e490c2ab368ec5661b814fab3a43 Mon Sep 17 00:00:00 2001 From: S34NW <12197162+S34NW@users.noreply.github.com> Date: Fri, 10 Sep 2021 23:24:23 +0100 Subject: [PATCH 3/4] oh, tidy up these brackets too --- code/modules/admin/topic.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index f3804f86c50..debb6984aa6 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -982,7 +982,7 @@ else if(href_list["removenote"]) var/note_id = href_list["removenote"] - if((alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes")) + if(alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes") remove_note(note_id) else if(href_list["editnote"]) From e3171f32812d289d0a61c92acdab234a60f64e44 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Sat, 11 Sep 2021 00:45:31 +0100 Subject: [PATCH 4/4] Update code/modules/admin/topic.dm Co-authored-by: SabreML <57483089+SabreML@users.noreply.github.com> --- code/modules/admin/topic.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index debb6984aa6..185f3343519 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -982,7 +982,7 @@ else if(href_list["removenote"]) var/note_id = href_list["removenote"] - if(alert("Do you really want to delete this note?","Note deletion confirmation", "Yes", "No") == "Yes") + if(alert("Do you really want to delete this note?", "Note deletion confirmation", "Yes", "No") == "Yes") remove_note(note_id) else if(href_list["editnote"])