Changeset 22648


Ignore:
Timestamp:
2013/03/09 21:50:11 (11 years ago)
Author:
adachi
Message:

#2181 インストール処理組み込み

File:
1 edited

Legend:

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

    r22646 r22648  
    3232     
    3333    function execInstall() { 
     34        GC_Utils_Ex::gfPrintLog("start install"); 
    3435         
    35         GC_Utils_Ex::gfPrintLog("start install"); 
     36        $plugin_code = $this->arrPlugin['plugin_code']; 
    3637 
    37         // ファイルコピーの事前チェック? 
    38          
    3938        $objQuery =& SC_Query::getSingletonInstance(); 
    4039        $objQuery->begin(); 
    4140         
    4241        // テーブル作成SQLなどを実行 
    43         $arrSql = $this->arrInstallData["plugin_code"]['sql']; 
     42        $arrSql = $this->arrInstallData[$plugin_code]['sql']; 
    4443         
    4544        foreach ($arrSql as $sql) { 
    46             GC_Utils_Ex::gfPrintLog("start install"); 
     45            GC_Utils_Ex::gfPrintLog("exec sql:" . $sql['sql']); 
    4746            $objQuery->query($sql['sql'], $sql['params']); 
    4847        } 
    4948 
    5049        // プラグインのディレクトリコピー 
    51         $arrCopyDirectories = $this->arrInstallData["plugin_code"]['copy_directory']; 
     50        $arrCopyDirectories = $this->arrInstallData[$plugin_code]['copy_directory']; 
    5251 
    5352        foreach ($arrCopyDirectories as $directory) { 
     53            GC_Utils_Ex::gfPrintLog("exec dir copy:" . $directory['src']); 
    5454            // ディレクトリコピー -> HTML配下とDATA配下を別関数にする 
    55             // SC_Utils::copyDirectory(PLUGIN_UPLOAD_REALDIR . $arrPlugin['plugin_code'] . "/" . $directory, PLUGIN_HTML_REALDIR . $arrPlugin['plugin_code'] . "/" . $directory); 
     55            SC_Utils::copyDirectory( 
     56                    PLUGIN_UPLOAD_REALDIR . $plugin_code . DIRECTORY_SEPARATOR . $directory['src'], 
     57                    PLUGIN_HTML_REALDIR   . $plugin_code . DIRECTORY_SEPARATOR . $directory['dist']); 
    5658        } 
    5759 
    5860        // プラグインのファイルコピー 
    59         $arrCopyFiles = $this->arrInstallData["plugin_code"]['copy_file']; 
     61        $arrCopyFiles = $this->arrInstallData[$plugin_code]['copy_file']; 
    6062 
    6163        foreach ($arrCopyFiles as $file) { 
     64            GC_Utils_Ex::gfPrintLog("exec file copy:" . $file['src']); 
    6265            // ファイルコピー 
    63             copy(PLUGIN_UPLOAD_REALDIR . $arrPlugin['plugin_code'] . "/" . $file['src'], PLUGIN_HTML_REALDIR . $arrPlugin['plugin_code'] . "/" . $file['dist']); 
     66            copy(PLUGIN_UPLOAD_REALDIR . $plugin_code . DIRECTORY_SEPARATOR . $file['src'], 
     67                 PLUGIN_HTML_REALDIR   . $plugin_code . DIRECTORY_SEPARATOR . $file['dist']); 
    6468        } 
    6569 
     
    7074     
    7175    function copyFile($src, $dist) { 
    72         $this->arrInstallData["plugin_code"]['copy_file'] = array( 
     76        $plugin_code = $this->arrPlugin['plugin_code']; 
     77        $this->arrInstallData[$plugin_code]['copy_file'] = array( 
    7378            'src'    => $src, 
    7479            'dist' => $dist 
     
    7782 
    7883    function copyDirectory($src, $dist) { 
    79         $this->arrInstallData["plugin_code"]['copy_directory'] = array( 
     84        $plugin_code = $this->arrPlugin['plugin_code']; 
     85        $this->arrInstallData[$plugin_code]['copy_directory'] = array( 
    8086            'src'    => $src, 
    8187            'dist' => $dist 
Note: See TracChangeset for help on using the changeset viewer.