Changeset 16313


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

インストーラ修正

Location:
branches/feature-module-update/html/install
Files:
2 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 
  • branches/feature-module-update/html/install/sql/insert_data.sql

    r16311 r16313  
    982982INSERT INTO mtb_constants VALUES ('SITE_CONTROL_TRACKBACK','1',282,'サイト管理 トラックバック'); 
    983983INSERT INTO mtb_constants VALUES ('SITE_CONTROL_AFFILIATE','2',283,'サイト管理 アフィリエイト'); 
    984  
    985 -- テンプレート関連 
    986984INSERT INTO mtb_constants VALUES ('DEFAULT_TEMPLATE_NAME', '"default"', 300,'デフォルトテンプレート名'); 
    987985INSERT INTO mtb_constants VALUES ('TEMPLATE_NAME', 'DEFAULT_TEMPLATE_NAME', 301,'テンプレート名'); 
     
    994992INSERT INTO mtb_constants VALUES ('BLOC_DIR','"bloc/"', 308,'ブロックファイル保存先'); 
    995993INSERT INTO mtb_constants VALUES ('BLOC_PATH','TEMPLATE_DIR . BLOC_DIR', 309,'ブロックファイル保存先'); 
    996  
    997 -- モバイル関連 
    998994INSERT INTO mtb_constants VALUES ('MOBILE_TEMPLATE_DIR', 'TEMPLATE_DIR . "mobile/"', 400,'SMARTYテンプレート(mobile)'); 
    999995INSERT INTO mtb_constants VALUES ('MOBILE_COMPILE_DIR', 'COMPILE_DIR . "mobile/"', 401,'SMARTYコンパイル(mobile)'); 
Note: See TracChangeset for help on using the changeset viewer.