Changeset 21756


Ignore:
Timestamp:
2012/04/17 16:10:34 (12 years ago)
Author:
shutta
Message:

#515 PHP 5.3.0対応
PHP5.3以降で、非推奨関数となるereg系関数を書き換えた。
r21755 の対応漏れ。
html/install/index.phpが漏れていたので対応。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/html/install/index.php

    r21741 r21756  
    209209            $arrSendData = array(); 
    210210            foreach ($_POST as $key => $val) { 
    211                 if (ereg('^senddata_*', $key)) { 
     211                if (preg_match('/^senddata_*/', $key)) { 
    212212                    $arrSendDataTmp = array(str_replace('senddata_', '', $key) => $val); 
    213213                    $arrSendData = array_merge($arrSendData, $arrSendDataTmp); 
     
    492492    $normal_url = $objWebParam->getValue('normal_url'); 
    493493    // 語尾に'/'をつける 
    494     if (!ereg('/$', $normal_url)) $normal_url = $normal_url . '/'; 
     494    $normal_url = rtrim($normal_url, '/') . '/'; 
    495495 
    496496    $arrDsn = getArrayDsn($objDBParam); 
     
    572572    $secure_url = $objWebParam->getValue('secure_url'); 
    573573    // 語尾に'/'をつける 
    574     if (!ereg('/$', $secure_url)) { 
    575         $secure_url = $secure_url . '/'; 
    576     } 
     574    $secure_url = rtrim($secure_url, '/') . '/'; 
    577575    $objPage->tpl_sslurl = $secure_url; 
    578576    //EC-CUBEオフィシャルサイトからのお知らせURL 
     
    588586        $normal_url = HTTP_URL; 
    589587    } else { 
    590         $dir = ereg_replace('install/.*$', '', $_SERVER['REQUEST_URI']); 
     588        $dir = preg_replace('|install/.*$|', '', $_SERVER['REQUEST_URI']); 
    591589        $normal_url = 'http://' . $_SERVER['HTTP_HOST'] . $dir; 
    592590    } 
     
    595593        $secure_url = HTTPS_URL; 
    596594    } else { 
    597         $dir = ereg_replace('install/.*$', '', $_SERVER['REQUEST_URI']); 
     595        $dir = preg_replace('|install/.*$|', '', $_SERVER['REQUEST_URI']); 
    598596        $secure_url = 'http://' . $_SERVER['HTTP_HOST'] . $dir; 
    599597    } 
     
    696694 
    697695    // ディレクトリ名のみ取得する 
    698     $normal_dir = ereg_replace('^https?://[a-zA-Z0-9_~=&\?\.\-]+', '', $arrRet['normal_url']); 
    699     $secure_dir = ereg_replace('^https?://[a-zA-Z0-9_~=&\?\.\-]+', '', $arrRet['secure_url']); 
     696    $normal_dir = preg_replace('|^https?://[a-zA-Z0-9_~=&\?\.\-]+|', '', $arrRet['normal_url']); 
     697    $secure_dir = preg_replace('|^https?://[a-zA-Z0-9_~=&\?\.\-]+|', '', $arrRet['secure_url']); 
    700698 
    701699    if ($normal_dir != $secure_dir) { 
     
    745743            $objErr->arrErr['all'] = '>> ' . $objDB->message . '<br />'; 
    746744            // エラー文を取得する 
    747             ereg('\[(.*)\]', $objDB->userinfo, $arrKey); 
     745            preg_match('/\[(.*)\]/', $objDB->userinfo, $arrKey); 
    748746            $objErr->arrErr['all'] .= $arrKey[0] . '<br />'; 
    749747            GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG); 
     
    786784                        $arrErr['all'] = '>> ' . $ret->message . '<br />'; 
    787785                        // エラー文を取得する 
    788                         ereg('\[(.*)\]', $ret->userinfo, $arrKey); 
     786                        preg_match('/\[(.*)\]/', $ret->userinfo, $arrKey); 
    789787                        $arrErr['all'] .= $arrKey[0] . '<br />'; 
    790788                        $objPage->update_mess .= '>> テーブル構成の変更に失敗しました。<br />'; 
     
    895893    $normal_url = $objWebParam->getValue('normal_url'); 
    896894    // 語尾に'/'をつける 
    897     if (!ereg('/$', $normal_url)) { 
    898         $normal_url = $normal_url . '/'; 
    899     } 
     895    $normal_url = rtrim($normal_url, '/') . '/'; 
    900896 
    901897    $secure_url = $objWebParam->getValue('secure_url'); 
    902898    // 語尾に'/'をつける 
    903     if (!ereg('/$', $secure_url)) { 
    904         $secure_url = $secure_url . '/'; 
    905     } 
     899    $secure_url = rtrim($secure_url, '/') . '/'; 
    906900 
    907901    // ディレクトリの取得 
    908     $url_dir = ereg_replace('^https?://[a-zA-Z0-9_:~=&\?\.\-]+', '', $normal_url); 
     902    $url_dir = preg_replace('|^https?://[a-zA-Z0-9_:~=&\?\.\-]+|', '', $normal_url); 
    909903 
    910904    //管理機能SSL制限 
Note: See TracChangeset for help on using the changeset viewer.