game 테이블을 KVStorage로 일부 대체

This commit is contained in:
2018-05-13 01:26:44 +09:00
parent 9d6181ede1
commit 166eafe4ee
13 changed files with 67 additions and 98 deletions
+1 -3
View File
@@ -202,9 +202,7 @@ function pushGeneralPublicRecord(array $history, $year=null, $month=null) {
$db = DB::db();
$gameStor = KVStorage::getStorage($db, 'game_env');
if($year === null || $month === null){
$game = $db->queryFirstRow('SELECT year, month FROM game LIMIT 1');
$year = $game['year'];
$month = $game['month'];
list($year, $month) = $gameStor->getValuesAsArray(['year', 'month']);
}
$request = array_map(function($text) use ($year, $month) {
return ['year'=>$year, 'month'=>$month, 'text'=>$text];