newRootDB(), newDB가 이전의 코드 수정으로 new를 수행하는 경우가 줄어들었으므로 getRootDB(), newDB() 로 이름 변경
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
function getScenario() {
|
||||
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
|
||||
$scenario = newDB()->queryFirstColumn('select `scenario` from `game` where no=1');
|
||||
$scenario = getDB()->queryFirstColumn('select `scenario` from `game` where no=1');
|
||||
|
||||
switch($scenario) {
|
||||
case 0: $str = '공백지모드'; break;
|
||||
@@ -629,7 +629,7 @@ function getBill($dedication) {
|
||||
function getCost($armtype) {
|
||||
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
|
||||
//TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함
|
||||
return newDB()->queryFirstColumn('select cst%l from game where no=1', intval($armtype));
|
||||
return getDB()->queryFirstColumn('select cst%l from game where no=1', intval($armtype));
|
||||
}
|
||||
|
||||
function TechLimit($startyear, $year, $tech) {
|
||||
|
||||
Reference in New Issue
Block a user