fix: 연감 페이지에서 지도가 다른 왕조 일람 역사 지도 에러

This commit is contained in:
2022-05-15 18:09:18 +09:00
parent 8104852abf
commit d28a5e095a
2 changed files with 33 additions and 11 deletions
+9 -1
View File
@@ -23,7 +23,14 @@ if ($serverID !== UniqueConst::$serverID) {
[$f_year, $f_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year ASC, month ASC LIMIT 1', $serverID);
[$l_year, $l_month] = $db->queryFirstList('SELECT year, month FROM ng_history WHERE server_id = %s ORDER BY year DESC, month DESC LIMIT 1', $serverID);
[$currentYear, $currentMonth] = $gameStor->getValuesAsArray(['year', 'month']);
if($serverID === UniqueConst::$serverID){
[$currentYear, $currentMonth] = $gameStor->getValuesAsArray(['year', 'month']);
}
else{
[$currentYear, $currentMonth] = [$l_year, $l_month];
}
$me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $userID);
@@ -46,6 +53,7 @@ $me = $db->queryFirstRow('SELECT con, turntime FROM general WHERE owner = %i', $
'currentYearMonth' => Util::joinYearMonth($currentYear, $currentMonth),
'serverNick' => DB::prefix(),
'serverID' => UniqueConst::$serverID,
'mapName' => $mapName,
],
'query' => [
'serverID' => $serverID,