Ignore:
Timestamp:
2011/03/04 19:51:32 (13 years ago)
Author:
shutta
Message:

拡張クラス(/class_extends/)が存在するのに基底クラス(/class/)のメソッドを呼び出している部分を拡張クラスに書き換え。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/util/SC_Utils.php

    r20480 r20484  
    8181            if( !ereg('/install/', $phpself) ) { 
    8282                $path = substr($phpself, 0, strpos($phpself, basename($phpself))); 
    83                 $install_url = SC_Utils::searchInstallerPath($path); 
     83                $install_url = SC_Utils_Ex::searchInstallerPath($path); 
    8484                header('Location: ' . $install_url); 
    8585                exit; 
     
    8888        $path = HTML_REALDIR . 'install/' . DIR_INDEX_FILE; 
    8989        if(file_exists($path)) { 
    90             SC_Utils::sfErrorHeader('>> /install/' . DIR_INDEX_FILE . ' は、インストール完了後にファイルを削除してください。'); 
     90            SC_Utils_Ex::sfErrorHeader('>> /install/' . DIR_INDEX_FILE . ' は、インストール完了後にファイルを削除してください。'); 
    9191        } 
    9292    } 
     
    106106        $installer = 'install/' . DIR_INDEX_PATH; 
    107107 
    108         if (SC_Utils::sfIsHTTPS()) { 
     108        if (SC_Utils_Ex::sfIsHTTPS()) { 
    109109            $proto = "https://"; 
    110110        } else { 
     
    119119        } 
    120120        $installer_url = $host . $path . $installer; 
    121         $resources = fopen(SC_Utils::getRealURL($installer_url), 'r'); 
     121        $resources = fopen(SC_Utils_Ex::getRealURL($installer_url), 'r'); 
    122122        if ($resources === false) { 
    123             $installer_url = SC_Utils::searchInstallerPath($path . '../'); 
     123            $installer_url = SC_Utils_Ex::searchInstallerPath($path . '../'); 
    124124        } 
    125125        return $installer_url; 
     
    229229            if($disp_error) { 
    230230                // エラーページの表示 
    231                 SC_Utils::sfDispError($ret); 
     231                SC_Utils_Ex::sfDispError($ret); 
    232232            } 
    233233            return false; 
     
    240240            // sfErrorHeader('>> referrerが無効になっています。'); 
    241241        } else { 
    242             $domain  = SC_Utils::sfIsHTTPS() ? HTTPS_URL : HTTP_URL; 
     242            $domain  = SC_Utils_Ex::sfIsHTTPS() ? HTTPS_URL : HTTP_URL; 
    243243            $pattern = sprintf('|^%s.*|', $domain); 
    244244            $referer = $_SERVER['HTTP_REFERER']; 
     
    246246            // 管理画面から以外の遷移の場合はエラー画面を表示 
    247247            if (!preg_match($pattern, $referer)) { 
    248                 if ($disp_error) SC_Utils::sfDispError(INVALID_MOVE_ERRORR); 
     248                if ($disp_error) SC_Utils_Ex::sfDispError(INVALID_MOVE_ERRORR); 
    249249                return false; 
    250250            } 
     
    347347 
    348348        if($prefix == "") { 
    349             $dir_name = SC_Utils::sfUpDirName(); 
     349            $dir_name = SC_Utils_Ex::sfUpDirName(); 
    350350            $file_name = $dir_name . date("ymdHis") .".csv"; 
    351351        } else { 
     
    369369    function sfGetCSVData($data, $prefix = ""){ 
    370370        if($prefix == "") { 
    371             $dir_name = SC_Utils::sfUpDirName(); 
     371            $dir_name = SC_Utils_Ex::sfUpDirName(); 
    372372            $file_name = $dir_name . date("ymdHis") .".csv"; 
    373373        } else { 
     
    551551        for($cnt = 0; $cnt < $max; $cnt++) { 
    552552            if($keysize != "") { 
    553                 $key = SC_Utils::sfCutString($arrList[$cnt][$keyname], $keysize); 
     553                $key = SC_Utils_Ex::sfCutString($arrList[$cnt][$keyname], $keysize); 
    554554            } else { 
    555555                $key = $arrList[$cnt][$keyname]; 
     
    576576        for($cnt = 0; $cnt < $max; $cnt++) { 
    577577            if($keysize != "") { 
    578                 $key = SC_Utils::sfCutString($arrList[$cnt][$keyname], $keysize); 
     578                $key = SC_Utils_Ex::sfCutString($arrList[$cnt][$keyname], $keysize); 
    579579            } else { 
    580580                $key = $arrList[$cnt][$keyname]; 
     
    779779 
    780780        // 整数且つ0出なければ桁数指定を行う 
    781         if(SC_Utils::sfIsInt($adjust) and $pow > 1){ 
     781        if(SC_Utils_Ex::sfIsInt($adjust) and $pow > 1){ 
    782782            $ret = (round($value * $adjust)/$adjust); 
    783783        } 
     
    822822        $arrList = $objQuery->getAll($sql); 
    823823        // キーと値をセットした配列を取得 
    824         $arrRet = SC_Utils::sfArrKeyValue($arrList, 'class_id', 'count'); 
     824        $arrRet = SC_Utils_Ex::sfArrKeyValue($arrList, 'class_id', 'count'); 
    825825 
    826826        return $arrRet; 
     
    10111011        // ファイルが開けなかった場合はエラーページを表示 
    10121012          else { 
    1013               SC_Utils::sfDispError(''); 
     1013              SC_Utils_Ex::sfDispError(''); 
    10141014              exit; 
    10151015        } 
     
    11191119                } 
    11201120                if(is_array($val)) { 
    1121                     $arrDst = SC_Utils::sfMakeHiddenArray($val, $arrDst, $keyname); 
     1121                    $arrDst = SC_Utils_Ex::sfMakeHiddenArray($val, $arrDst, $keyname); 
    11221122                } else { 
    11231123                    $arrDst[$keyname] = $val; 
     
    12411241                if(!file_exists($dir)) { 
    12421242                    mkdir($dir); 
    1243                     GC_Utils::gfPrintLog("mkdir $dir"); 
     1243                    GC_Utils_Ex::gfPrintLog("mkdir $dir"); 
    12441244                } 
    12451245            } else { 
    1246                 SC_Utils::sfMakeDir($dir); 
     1246                SC_Utils_Ex::sfMakeDir($dir); 
    12471247                if(is_writable(dirname($dir))) { 
    12481248                    if(!file_exists($dir)) { 
    12491249                        mkdir($dir); 
    1250                         GC_Utils::gfPrintLog("mkdir $dir"); 
     1250                        GC_Utils_Ex::gfPrintLog("mkdir $dir"); 
    12511251                    } 
    12521252                } 
     
    12891289                $data=$matches[2]; 
    12901290                if( is_dir( $data_ ) ){ 
    1291                     $mess = SC_Utils::sfCopyDir( $data_.'/', $des.$data.'/', $mess); 
     1291                    $mess = SC_Utils_Ex::sfCopyDir( $data_.'/', $des.$data.'/', $mess); 
    12921292                }else{ 
    12931293                    if(!$override && file_exists($des.$data)) { 
     
    13191319                    $ret = unlink($dir . "/" . $file); 
    13201320                }else if (is_dir($del_file)){ 
    1321                     $ret = SC_Utils::sfDelFile($del_file); 
     1321                    $ret = SC_Utils_Ex::sfDelFile($del_file); 
    13221322                } 
    13231323 
     
    15311531                        $path = $dir."/".$file; 
    15321532                        // SELECT内の見た目を整えるため指定文字数で切る 
    1533                         $file_name = SC_Utils::sfCutString($file, FILE_NAME_LEN); 
    1534                         $file_size = SC_Utils::sfCutString(SC_Utils::sfGetDirSize($path), FILE_NAME_LEN); 
     1533                        $file_name = SC_Utils_Ex::sfCutString($file, FILE_NAME_LEN); 
     1534                        $file_size = SC_Utils_Ex::sfCutString(SC_Utils_Ex::sfGetDirSize($path), FILE_NAME_LEN); 
    15351535                        $file_time = date("Y/m/d", filemtime($path)); 
    15361536 
     
    15781578                    } else if (is_dir($path) && $file != '..' && $file != '.') { 
    15791579                        // 下層ファイルのバイト数を取得する為、再帰的に呼び出す。 
    1580                         $bytes += SC_Utils::sfGetDirSize($path); 
     1580                        $bytes += SC_Utils_Ex::sfGetDirSize($path); 
    15811581                    } 
    15821582                } 
     
    21972197                     * 自クラスへ再帰する. 
    21982198                     */ 
    2199                     if (!SC_Utils::isBlank($in, $greedy)) { 
     2199                    if (!SC_Utils_Ex::isBlank($in, $greedy)) { 
    22002200                        return false; 
    22012201                    } 
     
    23142314        } else { 
    23152315            require_once(dirname(__FILE__) . '/../../module/Services/JSON.php'); 
    2316             GC_Utils::gfPrintLog(' *use Services_JSON::encode(). faster than using the json_encode!'); 
     2316            GC_Utils_Ex::gfPrintLog(' *use Services_JSON::encode(). faster than using the json_encode!'); 
    23172317            $objJson = new Services_JSON(); 
    23182318            return $objJson->encode($value); 
     
    23372337        } else { 
    23382338            require_once(dirname(__FILE__) . '/../../module/Services/JSON.php'); 
    2339             GC_Utils::gfPrintLog(' *use Services_JSON::decode(). faster than using the json_decode!'); 
     2339            GC_Utils_Ex::gfPrintLog(' *use Services_JSON::decode(). faster than using the json_decode!'); 
    23402340            $objJson = new Services_JSON(); 
    23412341            return $objJson->decode($json); 
Note: See TracChangeset for help on using the changeset viewer.