- Timestamp:
- 2012/06/20 11:57:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/helper/SC_Helper_FileManager.php
r21867 r21927 42 42 43 43 if (is_dir($dir)) { 44 if ($dh = opendir($dir)) { 44 $dh = opendir($dir); 45 if ($dh) { 45 46 $cnt = 0; 47 $arrDir = array(); 46 48 // 行末の/を取り除く 47 49 while (($file = readdir($dh)) !== false) $arrDir[] = $file; … … 55 57 $path = $dir.'/'.$file; 56 58 // SELECT内の見た目を整えるため指定文字数で切る 57 $file_name = SC_Utils_Ex::sfCutString($file, FILE_NAME_LEN);58 59 $file_size = SC_Utils_Ex::sfCutString(SC_Helper_FileManager::sfGetDirSize($path), FILE_NAME_LEN); 59 60 $file_time = date('Y/m/d', filemtime($path)); … … 172 173 173 174 if (file_exists($dir)) { 174 if ($handle = opendir("$dir")) { 175 $handle = opendir($dir); 176 if ($handle) { 177 $arrDir = array(); 175 178 while (false !== ($item = readdir($handle))) $arrDir[] = $item; 176 179 // アルファベットと数字でソート … … 336 339 // ファイル一覧取得 337 340 $arrFileHash = SC_Helper_FileManager_Ex::sfGetFileList($dir); 341 $arrFileList = array(); 338 342 foreach ($arrFileHash as $val) { 339 343 $arrFileList[] = $val['file_name'];
Note: See TracChangeset
for help on using the changeset viewer.