Index: /branches/comu-ver2/html/install/index.php
===================================================================
--- /branches/comu-ver2/html/install/index.php	(revision 17672)
+++ /branches/comu-ver2/html/install/index.php	(revision 17866)
@@ -100,4 +100,6 @@
     $objPage->arrErr = lfCheckDBError($objDBParam);
     if(count($objPage->arrErr) == 0) {
+        // 設定ファイルの生成
+        lfMakeConfigFile();
         $objPage = lfDispStep3($objPage);
     } else {
@@ -136,6 +138,4 @@
         $skip = $_POST["db_skip"];
         if ($skip == "on") {
-            // 設定ファイルの生成
-            lfMakeConfigFile();
             $objPage = lfDispComplete($objPage);
             //$objPage = lfDispStep4($objPage);
@@ -194,6 +194,4 @@
 
     if(count($objPage->arrErr) == 0) {
-        // 設定ファイルの生成
-        lfMakeConfigFile();
         $objPage = lfDispStep3($objPage);
         $objPage->tpl_mode = 'step4';
@@ -705,5 +703,4 @@
 function lfCheckDBError($objFormParam) {
     global $objPage;
-    global $objDb;
 
     // 入力データを渡す。
@@ -716,5 +713,4 @@
         // 接続確認
         $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name'];
-        define("DB_TYPE", $arrRet['db_type']);
         // Debugモード指定
         $options['debug'] = PEAR_DB_DEBUG;
@@ -722,6 +718,7 @@
         // 接続成功
         if(!PEAR::isError($objDB)) {
+            $dbFactory = SC_DB_DBFactory_Ex::getInstance();
             // データベースバージョン情報の取得
-            $objPage->tpl_db_version = $objDb->sfGetDBVersion($dsn);
+            $objPage->tpl_db_version = $dbFactory->sfGetDBVersion($dsn);
         } else {
             $objErr->arrErr['all'] = ">> " . $objDB->message . "<br>";
