Ignore:
Timestamp:
2012/02/06 11:05:15 (14 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • Zend Framework PHP 標準コーディング規約への準拠を高めた
File:
1 edited

Legend:

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

    r21420 r21441  
    5252                // アルファベットと数字でソート 
    5353                natcasesort($arrDir); 
    54                 foreach($arrDir as $file) { 
     54                foreach ($arrDir as $file) { 
    5555                    // ./ と ../を除くファイルのみを取得 
    56                     if($file != "." && $file != "..") { 
     56                    if ($file != "." && $file != "..") { 
    5757 
    5858                        $path = $dir."/".$file; 
     
    6363 
    6464                        // ディレクトリとファイルで格納配列を変える 
    65                         if(is_dir($path)) { 
     65                        if (is_dir($path)) { 
    6666                            $arrDirList[$cnt]['file_name'] = $file; 
    6767                            $arrDirList[$cnt]['file_path'] = $path; 
     
    9595    function sfGetDirSize($dir) { 
    9696        $bytes = 0; 
    97         if(file_exists($dir)) { 
     97        if (file_exists($dir)) { 
    9898            // ディレクトリの場合下層ファイルの総量を取得 
    9999            if (is_dir($dir)) { 
     
    129129    function sfDeleteDir($dir) { 
    130130        $arrResult = array(); 
    131         if(file_exists($dir)) { 
     131        if (file_exists($dir)) { 
    132132            // ディレクトリかチェック 
    133133            if (is_dir($dir)) { 
     
    176176        $dir = ereg_replace("/$", "", $dir); 
    177177        // 最上位層を格納(user_data/) 
    178         if($this->sfDirChildExists($dir)) { 
     178        if ($this->sfDirChildExists($dir)) { 
    179179            $arrTree[$cnt]['type'] = "_parent"; 
    180180        } else { 
     
    185185        $arrTree[$cnt]['count'] = $cnt; 
    186186        // 初期表示はオープン 
    187         if($_POST['mode'] != '') { 
     187        if ($_POST['mode'] != '') { 
    188188            $arrTree[$cnt]['open'] = $this->lfIsFileOpen($dir, $tree_status); 
    189189        } else { 
     
    210210    function sfGetFileTreeSub($dir, $default_rank, &$cnt, &$arrTree, $tree_status) { 
    211211 
    212         if(file_exists($dir)) { 
     212        if (file_exists($dir)) { 
    213213            if ($handle = opendir("$dir")) { 
    214214                while (false !== ($item = readdir($handle))) $arrDir[] = $item; 
    215215                // アルファベットと数字でソート 
    216216                natcasesort($arrDir); 
    217                 foreach($arrDir as $item) { 
     217                foreach ($arrDir as $item) { 
    218218                    if ($item != "." && $item != "..") { 
    219219                        // 文末の/を取り除く 
     
    223223                        if (is_dir($path)) { 
    224224                            $arrTree[$cnt]['path'] = $path; 
    225                             if($this->sfDirChildExists($path)) { 
     225                            if ($this->sfDirChildExists($path)) { 
    226226                                $arrTree[$cnt]['type'] = "_parent"; 
    227227                            } else { 
     
    254254     */ 
    255255    function sfDirChildExists($dir) { 
    256         if(file_exists($dir)) { 
     256        if (file_exists($dir)) { 
    257257            if (is_dir($dir)) { 
    258258                $handle = opendir($dir); 
     
    281281    function lfIsFileOpen($dir, $tree_status) { 
    282282        $arrTreeStatus = explode('|', $tree_status); 
    283         if(in_array($dir, $arrTreeStatus)) { 
     283        if (in_array($dir, $arrTreeStatus)) { 
    284284            return true; 
    285285        } 
     
    312312    function sfCreateFile($file, $mode = "") { 
    313313        // 行末の/を取り除く 
    314         if($mode != "") { 
     314        if ($mode != "") { 
    315315            $ret = @mkdir($file, $mode); 
    316316        } else { 
     
    332332        $fp = @fopen($filename, 'rb' ); 
    333333        //ファイル内容を全て変数に読み込む 
    334         if($fp) { 
     334        if ($fp) { 
    335335            $str = @fread($fp, filesize($filename)+1); 
    336336        } 
     
    375375        // ファイル一覧取得 
    376376        $arrFileHash = SC_Utils_Ex::sfGetFileList($dir); 
    377         foreach($arrFileHash as $val) { 
     377        foreach ($arrFileHash as $val) { 
    378378            $arrFileList[] = $val['file_name']; 
    379379            $debug_message.= "圧縮:".$val['file_name']."\n"; 
Note: See TracChangeset for help on using the changeset viewer.