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

#515 PHP 5.3.0対応
PHP5.3以降で、非推奨関数となるereg系関数を書き換えた。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_FileManager.php

    r21684 r21755  
    4646                // 行末の/を取り除く 
    4747                while (($file = readdir($dh)) !== false) $arrDir[] = $file; 
    48                 $dir = ereg_replace("/$", '', $dir); 
     48                $dir = rtrim($dir, '/'); 
    4949                // アルファベットと数字でソート 
    5050                natcasesort($arrDir); 
     
    9898                while ($file = readdir($handle)) { 
    9999                    // 行末の/を取り除く 
    100                     $dir = ereg_replace("/$", '', $dir); 
     100                    $dir = rtrim($dir, '/'); 
    101101                    $path = $dir.'/'.$file; 
    102102                    if ($file != '..' && $file != '.' && !is_dir($path)) { 
     
    173173 
    174174        // 文末の/を取り除く 
    175         $dir = ereg_replace("/$", '', $dir); 
     175        $dir = rtrim($dir, '/'); 
    176176        // 最上位層を格納(user_data/) 
    177177        if ($this->sfDirChildExists($dir)) { 
     
    217217                    if ($item != '.' && $item != '..') { 
    218218                        // 文末の/を取り除く 
    219                         $dir = ereg_replace("/$", '', $dir); 
     219                        $dir = rtrim($dir, '/'); 
    220220                        $path = $dir.'/'.$item; 
    221221                        // ディレクトリのみ取得 
     
    258258                while ($file = readdir($handle)) { 
    259259                    // 行末の/を取り除く 
    260                     $dir = ereg_replace("/$", '', $dir); 
     260                    $dir = rtrim($dir, '/'); 
    261261                    $path = $dir.'/'.$file; 
    262262                    if ($file != '..' && $file != '.' && is_dir($path)) { 
Note: See TracChangeset for help on using the changeset viewer.