Ignore:
Timestamp:
2007/10/07 00:00:08 (19 years ago)
Author:
nanasess
Message:

インストーラ修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/html/install/index.php

    r16292 r16313  
    9797    // 入力データを渡す。 
    9898    $arrRet =  $objDBParam->getHashArray(); 
     99    define("DB_TYPE", $arrRet['db_type']); 
    99100    $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 
    100101 
     
    153154    if(count($objPage->arrErr) == 0) { 
    154155        $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $dsn); 
    155  
    156156        if(count($objPage->arrErr) == 0) { 
    157157            $objPage->tpl_message.="○:初期データの作成に成功しました。<br>"; 
     
    198198    // 入力データを渡す。 
    199199    $arrRet =  $objDBParam->getHashArray(); 
     200    if (!defined("DB_TYPE")) { 
     201        define("DB_TYPE", $arrRet['db_type']); 
     202    } 
    200203    $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 
    201204 
     
    555558 
    556559    $arrDbParam = $objDBParam->getHashArray(); 
     560    if (!defined("DB_TYPE")) { 
     561        define("DB_TYPE", $arrDbParam['db_type']); 
     562    } 
    557563    $dsn = $arrDbParam['db_type']."://".$arrDbParam['db_user'].":".$arrDbParam['db_password']."@".$arrDbParam['db_server'].":".$arrDbParam['db_port']."/".$arrDbParam['db_name']; 
    558564 
     
    707713function lfCheckDBError($objFormParam) { 
    708714    global $objPage; 
     715    global $objDb; 
    709716 
    710717    // 入力データを渡す。 
     
    717724        // 接続確認 
    718725        $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 
     726        define("DB_TYPE", $arrRet['db_type']); 
    719727        // Debugモード指定 
    720728        $options['debug'] = PEAR_DB_DEBUG; 
     
    729737            ereg("\[(.*)\]", $objDB->userinfo, $arrKey); 
    730738            $objErr->arrErr['all'].= $arrKey[0] . "<br>"; 
    731             gfPrintLog($objDB->userinfo, INSTALL_LOG); 
     739            GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG); 
    732740        } 
    733741    } 
     
    763771                        $arrErr['all'].= $arrKey[0] . "<br>"; 
    764772                        $objPage->update_mess.=">> テーブル構成の変更に失敗しました。<br>"; 
    765                         gfPrintLog($ret->userinfo, INSTALL_LOG); 
     773                        GC_Utils_Ex::gfPrintLog($ret->userinfo, INSTALL_LOG); 
    766774                    } 
    767775                } 
     
    769777        } else { 
    770778            $arrErr['all'] = ">> " . $objDB->message; 
    771             gfPrintLog($objDB->userinfo, INSTALL_LOG); 
     779            GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG); 
    772780        } 
    773781    } 
     
    799807 
    800808    // ディレクトリの取得 
    801     $url_dir = ereg_replace("^https?://[a-zA-Z0-9_~=&\?\.\-]+", "", $normal_url); 
     809    $url_dir = ereg_replace("^https?://[a-zA-Z0-9_:~=&\?\.\-]+", "", $normal_url); 
    802810 
    803811    $data_path = SC_Utils_Ex::sfRmDupSlash($root_dir . HTML2DATA_DIR); 
     
    904912            ereg("\[(.*)\]", $objDB->userinfo, $arrKey); 
    905913            $arrErr['all'].= $arrKey[0] . "<br>"; 
    906             gfPrintLog($objDB->userinfo, INSTALL_LOG); 
     914            GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG); 
    907915        } 
    908916    } 
     
    913921function lfAddColumn($dsn) { 
    914922    global $objDBParam; 
     923    global $objDb; 
    915924 
    916925    // 受注テーブル 
     
    971980    if (!$objDb->sfColumnExists("dtb_customer", "mobile_phone_id", "text", $dsn, true)) { 
    972981        // インデックスの追加 
    973         sfIndexExists("dtb_customer", "mobile_phone_id", "dtb_customer_mobile_phone_id_key", 64, $dsn, true); 
     982        $objDb->sfIndexExists("dtb_customer", "mobile_phone_id", "dtb_customer_mobile_phone_id_key", 64, $dsn, true); 
    974983    } 
    975984 
Note: See TracChangeset for help on using the changeset viewer.