Changeset 22648
- Timestamp:
- 2013/03/09 21:50:11 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/camp/camp-2_13-plugin/data/class/plugin/SC_Plugin_Installer.php
r22646 r22648 32 32 33 33 function execInstall() { 34 GC_Utils_Ex::gfPrintLog("start install"); 34 35 35 GC_Utils_Ex::gfPrintLog("start install");36 $plugin_code = $this->arrPlugin['plugin_code']; 36 37 37 // ファイルコピーの事前チェック?38 39 38 $objQuery =& SC_Query::getSingletonInstance(); 40 39 $objQuery->begin(); 41 40 42 41 // テーブル作成SQLなどを実行 43 $arrSql = $this->arrInstallData[ "plugin_code"]['sql'];42 $arrSql = $this->arrInstallData[$plugin_code]['sql']; 44 43 45 44 foreach ($arrSql as $sql) { 46 GC_Utils_Ex::gfPrintLog(" start install");45 GC_Utils_Ex::gfPrintLog("exec sql:" . $sql['sql']); 47 46 $objQuery->query($sql['sql'], $sql['params']); 48 47 } 49 48 50 49 // プラグインのディレクトリコピー 51 $arrCopyDirectories = $this->arrInstallData[ "plugin_code"]['copy_directory'];50 $arrCopyDirectories = $this->arrInstallData[$plugin_code]['copy_directory']; 52 51 53 52 foreach ($arrCopyDirectories as $directory) { 53 GC_Utils_Ex::gfPrintLog("exec dir copy:" . $directory['src']); 54 54 // ディレクトリコピー -> 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']); 56 58 } 57 59 58 60 // プラグインのファイルコピー 59 $arrCopyFiles = $this->arrInstallData[ "plugin_code"]['copy_file'];61 $arrCopyFiles = $this->arrInstallData[$plugin_code]['copy_file']; 60 62 61 63 foreach ($arrCopyFiles as $file) { 64 GC_Utils_Ex::gfPrintLog("exec file copy:" . $file['src']); 62 65 // ファイルコピー 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']); 64 68 } 65 69 … … 70 74 71 75 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( 73 78 'src' => $src, 74 79 'dist' => $dist … … 77 82 78 83 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( 80 86 'src' => $src, 81 87 'dist' => $dist
Note: See TracChangeset
for help on using the changeset viewer.