Ignore:
Timestamp:
2011/02/27 01:13:17 (15 years ago)
Author:
shutta
Message:

refs #515
PHP5.3での非推奨関数split()をexplode(),preg_split()へ置き換え。

File:
1 edited

Legend:

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

    r20380 r20428  
    142142    function getRealURL($url) { 
    143143        $parse = parse_url($url); 
    144         $tmp = split('/', $parse['path']); 
     144        $tmp = explode('/', $parse['path']); 
    145145        $results = array(); 
    146146        foreach ($tmp as $v) { 
     
    387387    function sfUpDirName() { 
    388388        $path = $_SERVER['PHP_SELF']; 
    389         $arrVal = split("/", $path); 
     389        $arrVal = explode("/", $path); 
    390390        $cnt = count($arrVal); 
    391391        return $arrVal[($cnt - 2)]; 
     
    843843    /* DBから取り出した日付の文字列を調整する。*/ 
    844844    function sfDispDBDate($dbdate, $time = true) { 
    845         list($y, $m, $d, $H, $M) = split("[- :]", $dbdate); 
     845        list($y, $m, $d, $H, $M) = preg_split("/[- :]/", $dbdate); 
    846846 
    847847        if(strlen($y) > 0 && strlen($m) > 0 && strlen($d) > 0) { 
     
    14151415                    $line = fgets($src_fp); 
    14161416                    if(ereg("@version", $line)) { 
    1417                         $arrLine = split(" ", $line); 
     1417                        $arrLine = explode(" ", $line); 
    14181418                        $version = $arrLine[5]; 
    14191419                    } 
     
    16531653        $cnt = 0; 
    16541654        $arrTree = array(); 
    1655         $default_rank = count(split('/', $dir)); 
     1655        $default_rank = count(explode('/', $dir)); 
    16561656 
    16571657        // 文末の/を取り除く 
     
    17091709 
    17101710                            // 階層を割り出す 
    1711                             $arrCnt = split('/', $path); 
     1711                            $arrCnt = explode('/', $path); 
    17121712                            $rank = count($arrCnt); 
    17131713                            $arrTree[$cnt]['rank'] = $rank - $default_rank + 1; 
     
    17561756     */ 
    17571757    function lfIsFileOpen($dir, $tree_status) { 
    1758         $arrTreeStatus = split('\|', $tree_status); 
     1758        $arrTreeStatus = explode('\|', $tree_status); 
    17591759        if(in_array($dir, $arrTreeStatus)) { 
    17601760            return true; 
Note: See TracChangeset for help on using the changeset viewer.