getDB(), getRootDB()를 autoload 클래스로 변경
- 각각 DB::db(), RootDB::db()임.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
function getScenario() {
|
||||
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
|
||||
$scenario = getDB()->queryFirstColumn('select `scenario` from `game` where no=1');
|
||||
$scenario = DB::db()->queryFirstColumn('select `scenario` from `game` where no=1');
|
||||
|
||||
switch($scenario) {
|
||||
case 0: $str = '공백지모드'; break;
|
||||
@@ -626,7 +626,7 @@ function getBill($dedication) {
|
||||
function getCost($armtype) {
|
||||
//FIXME: 정말로 side effect가 없으려면 query는 밖으로 이동해야함.
|
||||
//TODO: 병종 값이 column으로 들어있는건 전혀 옳지 않음. key->value 형태로 바꿔야함
|
||||
return getDB()->queryFirstColumn('select %b from game where no=1', sprintf('cst%d', $armtype));
|
||||
return DB::db()->queryFirstColumn('select %b from game where no=1', sprintf('cst%d', $armtype));
|
||||
}
|
||||
|
||||
function TechLimit($startyear, $year, $tech) {
|
||||
|
||||
Reference in New Issue
Block a user