Ignore:
Timestamp:
2012/06/20 11:57:43 (12 years ago)
Author:
pineray
Message:

#1669 #1859 初期化漏れ、無駄な変数等

File:
1 edited

Legend:

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

    r21867 r21927  
    4242 
    4343        if (is_dir($dir)) { 
    44             if ($dh = opendir($dir)) { 
     44            $dh = opendir($dir); 
     45            if ($dh) { 
    4546                $cnt = 0; 
     47                $arrDir = array(); 
    4648                // 行末の/を取り除く 
    4749                while (($file = readdir($dh)) !== false) $arrDir[] = $file; 
     
    5557                        $path = $dir.'/'.$file; 
    5658                        // SELECT内の見た目を整えるため指定文字数で切る 
    57                         $file_name = SC_Utils_Ex::sfCutString($file, FILE_NAME_LEN); 
    5859                        $file_size = SC_Utils_Ex::sfCutString(SC_Helper_FileManager::sfGetDirSize($path), FILE_NAME_LEN); 
    5960                        $file_time = date('Y/m/d', filemtime($path)); 
     
    172173 
    173174        if (file_exists($dir)) { 
    174             if ($handle = opendir("$dir")) { 
     175            $handle = opendir($dir); 
     176            if ($handle) { 
     177                $arrDir = array(); 
    175178                while (false !== ($item = readdir($handle))) $arrDir[] = $item; 
    176179                // アルファベットと数字でソート 
     
    336339        // ファイル一覧取得 
    337340        $arrFileHash = SC_Helper_FileManager_Ex::sfGetFileList($dir); 
     341        $arrFileList = array(); 
    338342        foreach ($arrFileHash as $val) { 
    339343            $arrFileList[] = $val['file_name']; 
Note: See TracChangeset for help on using the changeset viewer.