From e9fc23b8ee90be51015d2d2660d74d0609fe6b76 Mon Sep 17 00:00:00 2001 From: hide_d Date: Fri, 2 Feb 2018 01:03:03 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B0=98=ED=99=98=ED=95=98=EB=8A=94=20?= =?UTF-8?q?=EB=AA=A8=EB=93=A0=20=EA=B0=92=20=EC=A4=91=20int=EA=B0=80=20?= =?UTF-8?q?=EB=90=98=EC=96=B4=EC=95=BC=ED=95=98=EB=8A=94=20=EA=B0=92?= =?UTF-8?q?=EB=93=A4=EC=9D=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/func_map.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/twe/func_map.php b/twe/func_map.php index 698efd5c..b14f1ac3 100644 --- a/twe/func_map.php +++ b/twe/func_map.php @@ -55,17 +55,17 @@ function getWorldMap($req){ $db = getDB(); $game = $db->queryFirstRow('select `startyear`, `year`, `month` from `game` where `no` = 1'); - $startYear = $game['startyear']; - $year = $game['year']; - $month = $game['month']; + $startYear = intval($game['startyear']); + $year = intval($game['year']); + $month = intval($game['month']); if($generalID && ($req->showMe || $req->neutralView)){ $city = $db->queryFirstRow( 'select `city`, `nation` from `general` where `user_id`=%i', $generalID); - $myCity = $city['city']; - $myNation = $city['nation']; + $myCity = intval($city['city']); + $myNation = intval($city['nation']); if(!$req->showMe){ $myCity = null; @@ -90,14 +90,20 @@ function getWorldMap($req){ $nationList = []; foreach($db->query('select `nation`, `name`, `color`, `capital` from `nation`') as $row){ - $nationList[] = [$row['nation'], $row['name'], $row['color'], $row['capital']]; + $nationList[] = [ + intval($row['nation']), + $row['name'], + $row['color'], + intval($row['capital']) + ]; } if($myNation){ //굳이 타국 도시에 있는 아국 장수 리스트를 뽑을 이유가 없음. 일단 다 뽑자. $shownByGeneralList = - $db->queryFirstRow('select distinct `city` from `general` where `nation` = %i', - $myNation); + array_map('intval', + $db->queryFirstColumn('select distinct `city` from `general` where `nation` = %i', + $myNation)); } else{ $shownByGeneralList = [];