Ignore:
Timestamp:
2013/03/09 21:40:37 (11 years ago)
Author:
dimaggio
Message:

#2181 コピー処理を追加

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_13-plugin/data/class/plugin/SC_Plugin_Installer.php

    r22633 r22646  
    3131    } 
    3232     
    33     /** 
    34      *  
    35      */ 
    3633    function execInstall() { 
    3734         
    3835        GC_Utils_Ex::gfPrintLog("start install"); 
     36 
     37        // ファイルコピーの事前チェック? 
    3938         
    4039        $objQuery =& SC_Query::getSingletonInstance(); 
     
    4847            $objQuery->query($sql['sql'], $sql['params']); 
    4948        } 
    50          
     49 
     50        // プラグインのディレクトリコピー 
     51        $arrCopyDirectories = $this->arrInstallData["plugin_code"]['copy_directory']; 
     52 
     53        foreach ($arrCopyDirectories as $directory) { 
     54            // ディレクトリコピー -> HTML配下とDATA配下を別関数にする 
     55            // SC_Utils::copyDirectory(PLUGIN_UPLOAD_REALDIR . $arrPlugin['plugin_code'] . "/" . $directory, PLUGIN_HTML_REALDIR . $arrPlugin['plugin_code'] . "/" . $directory); 
     56        } 
     57 
    5158        // プラグインのファイルコピー 
    5259        $arrCopyFiles = $this->arrInstallData["plugin_code"]['copy_file']; 
    53          
     60 
    5461        foreach ($arrCopyFiles as $file) { 
    5562            // ファイルコピー 
     63            copy(PLUGIN_UPLOAD_REALDIR . $arrPlugin['plugin_code'] . "/" . $file['src'], PLUGIN_HTML_REALDIR . $arrPlugin['plugin_code'] . "/" . $file['dist']); 
    5664        } 
    57          
     65 
    5866        $objQuery->commit(); 
    5967        GC_Utils_Ex::gfPrintLog("end install"); 
    60     } 
    61      
    62      
    63     function copyFile($src, $dist) { 
    6468         
    6569    } 
    6670     
     71    function copyFile($src, $dist) { 
     72        $this->arrInstallData["plugin_code"]['copy_file'] = array( 
     73            'src'    => $src, 
     74            'dist' => $dist 
     75        ); 
     76    } 
     77 
     78    function copyDirectory($src, $dist) { 
     79        $this->arrInstallData["plugin_code"]['copy_directory'] = array( 
     80            'src'    => $src, 
     81            'dist' => $dist 
     82        );         
     83    } 
     84 
    6785    function removeFile($dist) { 
    6886         
Note: See TracChangeset for help on using the changeset viewer.