From a9a2a29dd4bda64ec443510a0c6abc4355ce1841 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 30 Jun 2017 22:47:36 -0500 Subject: [PATCH] Fix the lobby menu not showing when the mysql connection had ghosted (#1839) --- code/modules/mob/dead/new_player/new_player.dm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index f6524d3502..87dbbd8d66 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -53,16 +53,15 @@ if(src.client && src.client.holder) isadmin = 1 var/datum/DBQuery/query_get_new_polls = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM [format_table_name("poll_vote")] WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM [format_table_name("poll_textreply")] WHERE ckey = \"[ckey]\")") - if(!query_get_new_polls.Execute()) - return - var/newpoll = 0 - if(query_get_new_polls.NextRow()) - newpoll = 1 + if(query_get_new_polls.Execute()) + var/newpoll = 0 + if(query_get_new_polls.NextRow()) + newpoll = 1 - if(newpoll) - output += "

Show Player Polls (NEW!)

" - else - output += "

Show Player Polls

" + if(newpoll) + output += "

Show Player Polls (NEW!)

" + else + output += "

Show Player Polls

" output += ""