Changeset 14466


Ignore:
Timestamp:
2007/06/07 21:50:26 (19 years ago)
Author:
uehara
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/data/class/SC_UploadFile.php

    r14434 r14466  
    2727    var $necessary;                 // ɬ¿Ü¤Î¾ì¹ç:true 
    2828    var $image;                     // ²èÁü¤Î¾ì¹ç:true 
    29      
     29 
    3030    // ¥Õ¥¡¥¤¥ë´ÉÍý¥¯¥é¥¹ 
    3131    function SC_UploadFile($temp_dir, $save_dir, $ftp_temp_dir = "", $ftp_save_dir = "", $multi_web_server_mode = false) { 
     
    127127                // °ì»þ¥Õ¥¡¥¤¥ë¤Î¾ì¹çºï½ü¤¹¤ë¡£ 
    128128                if($this->temp_file[$cnt] != "") { 
    129                     $objImage->deleteImage($this->temp_file[$cnt], $this->save_dir); 
     129                    // Éé²Ùʬ»¶»þ¤Ï¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¤«¤éºï½ü 
     130                    if($this->multi_web_server_mode === true) { 
     131                        ftpDeleteFile($this->save_dir . $this->temp_file[$cnt]); 
     132                    } else { 
     133                        $objImage->deleteImage($this->temp_file[$cnt], $this->save_dir); 
     134                    } 
    130135                } 
    131136                $this->temp_file[$cnt] = ""; 
     
    329334 
    330335    /**          
    331      * ¥Õ¥¡¥¤¥ë¤òÁ´¤Æ¤ÎWEB¥µ¡¼¥Ð¤Ø¥³¥Ô¡¼¤·¤Þ¤¹¡£ 
     336     * ¥Õ¥¡¥¤¥ë¤òÁ´¤Æ¤ÎWEB¥µ¡¼¥Ð¤Ø¥³¥Ô¡¼ 
    332337     * 
    333338     * @param string $dst_path ¥³¥Ô¡¼Àè¥Õ¥¡¥¤¥ë¥Ñ¥¹(ÁêÂХѥ¹) 
     
    345350        @unlink($src_path); 
    346351    } 
    347      
     352 
     353    /**          
     354     * ¥Õ¥¡¥¤¥ë¤òÁ´¤Æ¤ÎWEB¥µ¡¼¥Ð¾å¤«¤éºï½ü 
     355     * 
     356     * @param string $dst_path ¥³¥Ô¡¼Àè¥Õ¥¡¥¤¥ë¥Ñ¥¹(ÁêÂХѥ¹) 
     357     * @return void 
     358     */ 
     359    function ftpDeleteFile($dst_path) { 
     360        global $arrWEB_SERVERS; 
     361 
     362        // Á´¤Æ¤Î¥µ¡¼¥Ð¤Ë¥Õ¥¡¥¤¥ë¤ò¥³¥Ô¡¼¤¹¤ë 
     363        foreach($arrWEB_SERVERS as $array) { 
     364            sfFtpDelete($array['host'], $array['user'], $array['pass'], $dst_path); 
     365        } 
     366    } 
     367 
     368 
    348369    /** 
    349370     * FTPÍÑ¥Õ¥¡¥¤¥ë°ì»þ³ÊǼ¥Ç¥£¥ì¥¯¥È¥êºîÀ® 
Note: See TracChangeset for help on using the changeset viewer.