Ignore:
Timestamp:
2013/02/18 19:09:54 (13 years ago)
Author:
shutta
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

File:
1 edited

Legend:

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

    r22206 r22567  
    2323 
    2424/* アップロードファイル管理クラス */ 
    25 class SC_UploadFile { 
     25class SC_UploadFile  
     26{ 
    2627    var $temp_dir; 
    2728    var $save_dir; 
     
    5859 
    5960    // ファイル管理クラス 
    60     function __construct($temp_dir, $save_dir) { 
     61    function __construct($temp_dir, $save_dir) 
     62    { 
    6163        $this->temp_dir = rtrim($temp_dir, '/') . '/'; 
    6264        $this->save_dir = rtrim($save_dir, '/') . '/'; 
     
    6567 
    6668    // ファイル情報追加 
    67     function addFile($disp_name, $keyname, $arrExt, $size, $necessary=false, $width=0, $height=0, $image=true) { 
     69    function addFile($disp_name, $keyname, $arrExt, $size, $necessary=false, $width=0, $height=0, $image=true) 
     70    { 
    6871        $this->disp_name[] = $disp_name; 
    6972        $this->keyname[] = $keyname; 
     
    7679    } 
    7780    // サムネイル画像の作成 
    78     function makeThumb($src_file, $width, $height, $dst_file) { 
     81    function makeThumb($src_file, $width, $height, $dst_file) 
     82    { 
    7983        $objThumb = new gdthumb(); 
    8084        $ret = $objThumb->Main($src_file, $width, $height, $dst_file); 
     
    9094 
    9195    // アップロードされたファイルを保存する。 
    92     function makeTempFile($keyname, $rename = IMAGE_RENAME) { 
     96    function makeTempFile($keyname, $rename = IMAGE_RENAME) 
     97    { 
    9398        $objErr = new SC_CheckError_Ex(); 
    9499        $cnt = 0; 
     
    137142 
    138143    // アップロードされたダウンロードファイルを保存する。 
    139     function makeTempDownFile($keyname='down_file') { 
     144    function makeTempDownFile($keyname='down_file') 
     145    { 
    140146        $objErr = new SC_CheckError_Ex(); 
    141147        $cnt = 0; 
     
    168174 
    169175    // 画像を削除する。 
    170     function deleteFile($keyname) { 
     176    function deleteFile($keyname) 
     177    { 
    171178        $objImage = new SC_Image_Ex($this->temp_dir); 
    172179        $cnt = 0; 
     
    185192 
    186193    // 画像を削除する。 
    187     function deleteKikakuFile($keyname) { 
     194    function deleteKikakuFile($keyname) 
     195    { 
    188196        $objImage = new SC_Image_Ex($this->temp_dir); 
    189197        $cnt = 0; 
     
    202210 
    203211    // 一時ファイルパスを取得する。 
    204     function getTempFilePath($keyname) { 
     212    function getTempFilePath($keyname) 
     213    { 
    205214        $cnt = 0; 
    206215        $filepath = ''; 
     
    217226 
    218227    // 一時ファイルを保存ディレクトリに移す 
    219     function moveTempFile() { 
     228    function moveTempFile() 
     229    { 
    220230        $objImage = new SC_Image_Ex($this->temp_dir); 
    221231 
     
    238248 
    239249    // ダウンロード一時ファイルを保存ディレクトリに移す 
    240     function moveTempDownFile() { 
     250    function moveTempDownFile() 
     251    { 
    241252        $objImage = new SC_Image_Ex($this->temp_dir); 
    242253        for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 
     
    255266 
    256267    // HIDDEN用のファイル名配列を返す 
    257     function getHiddenFileList() { 
     268    function getHiddenFileList() 
     269    { 
    258270        $cnt = 0; 
    259271        $arrRet = array(); 
     
    271283 
    272284    // HIDDENで送られてきたファイル名を取得する 
    273     function setHiddenFileList($arrPOST) { 
     285    function setHiddenFileList($arrPOST) 
     286    { 
    274287        $cnt = 0; 
    275288        foreach ($this->keyname as $val) { 
     
    286299    } 
    287300 
    288     function setHiddenKikakuFileList($arrPOST) { 
     301    function setHiddenKikakuFileList($arrPOST) 
     302    { 
    289303        $cnt = 0; 
    290304        foreach ($this->keyname as $val) { 
     
    302316 
    303317    // フォームに渡す用のファイル情報配列を返す 
    304     function getFormFileList($temp_url, $save_url, $real_size = false) { 
     318    function getFormFileList($temp_url, $save_url, $real_size = false) 
     319    { 
    305320        $arrRet = array(); 
    306321        $cnt = 0; 
     
    341356 
    342357    // フォームに渡す用のダウンロードファイル情報を返す 
    343     function getFormDownFile() { 
     358    function getFormDownFile() 
     359    { 
    344360        $arrRet = ''; 
    345361        for ($cnt = 0; $cnt < count($this->keyname); $cnt++) { 
     
    352368        return $arrRet; 
    353369    } 
    354     function getFormKikakuDownFile() { 
     370    function getFormKikakuDownFile() 
     371    { 
    355372        $arrRet = array(); 
    356373        $cnt = 0; 
     
    367384 
    368385    // DB保存用のファイル名配列を返す 
    369     function getDBFileList() { 
     386    function getDBFileList() 
     387    { 
    370388        $cnt = 0; 
    371389        $dbFileList = array(); 
     
    382400 
    383401    // DBで保存されたファイル名配列をセットする 
    384     function setDBFileList($arrVal) { 
     402    function setDBFileList($arrVal) 
     403    { 
    385404        $cnt = 0; 
    386405        foreach ($this->keyname as $val) { 
     
    393412 
    394413    // DBで保存されたダウンロードファイル名をセットする 
    395     function setDBDownFile($arrVal) { 
     414    function setDBDownFile($arrVal) 
     415    { 
    396416        if (isset($arrVal['down_realfilename']) && $arrVal['down_realfilename'] != '') { 
    397417            $this->save_file[0] = $arrVal['down_realfilename']; 
     
    400420 
    401421    // DBで保存されたダウンロードファイル名をセットする(setDBDownFileと統合予定) 
    402     function setPostFileList($arrPost) { 
     422    function setPostFileList($arrPost) 
     423    { 
    403424        for ($cnt = 0;$cnt < count($this->keyname); $cnt++) { 
    404425            if (isset($arrPost['temp_down_realfilename:' . ($cnt+1)])) { 
     
    409430 
    410431    // 画像をセットする 
    411     function setDBImageList($arrVal) { 
     432    function setDBImageList($arrVal) 
     433    { 
    412434        $cnt = 0; 
    413435        foreach ($this->keyname as $val) { 
     
    420442 
    421443    // DB上のファイルの内削除要求があったファイルを削除する。 
    422     function deleteDBFile($arrVal) { 
     444    function deleteDBFile($arrVal) 
     445    { 
    423446        $objImage = new SC_Image_Ex($this->temp_dir); 
    424447        $cnt = 0; 
     
    434457 
    435458    // DB上のダウンロードファイルの内削除要求があったファイルを削除する。 
    436     function deleteDBDownFile($arrVal) { 
     459    function deleteDBDownFile($arrVal) 
     460    { 
    437461        $objImage = new SC_Image_Ex($this->temp_dir); 
    438462        $cnt = 0; 
     
    445469 
    446470    // 必須判定 
    447     function checkExists($keyname = '') { 
     471    function checkExists($keyname = '') 
     472    { 
    448473        $cnt = 0; 
    449474        $arrRet = array(); 
     
    467492 
    468493    // 拡大率を指定して画像保存 
    469     function saveResizeImage($keyname, $to_w, $to_h) { 
     494    function saveResizeImage($keyname, $to_w, $to_h) 
     495    { 
    470496        $path = ''; 
    471497 
     
    488514     * @return string 
    489515     */ 
    490     function lfGetTmpImageName($rename, $keyname = '', $uploadfile = '') { 
     516    function lfGetTmpImageName($rename, $keyname = '', $uploadfile = '') 
     517    { 
    491518 
    492519        if ($rename === true) { 
Note: See TracChangeset for help on using the changeset viewer.