Changeset 21877
- Timestamp:
- 2012/06/01 18:50:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php
r21872 r21877 341 341 SC_Helper_FileManager_Ex::deleteFile(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, false); 342 342 343 //シンタックスエラーがあるtar.gzをアップ後、削除するとたまにディレクトリが消えるので追加 344 $this->makeDir(PLUGIN_UPLOAD_REALDIR); 345 343 346 $arrErr = array(); 344 347 // ファイルをチェックし一時展開用ディレクトリに展開します. … … 629 632 // プラグインファイルを読み込みます. 630 633 $plugin_class_file_path = PLUGIN_UPLOAD_REALDIR . $plugin['plugin_code'] . '/' . $plugin['class_name'] . '.php'; 631 $arrErr = $this->requirePluginFile($plugin_class_file_path, 'plugin_error');632 if ($this->isError($arrErr) === true) {633 return $arrErr;634 }635 634 636 635 // プラグインが有効な場合に無効化処理を実行 … … 647 646 // アンインストール処理を実行します. 648 647 $arrErr = $this->execPlugin($plugin, $plugin['class_name'], 'uninstall'); 649 if ($this->isError($arrErr) === true) {650 return $arrErr;651 }652 648 // プラグインの削除処理. 653 649 $arrErr = $this->deletePlugin($plugin['plugin_id'], $plugin['plugin_code']); … … 806 802 $arrErr = array(); 807 803 if (file_exists($file_path)) { 808 require_once $file_path; 804 //requireだとファイルの存在チェックしかできないのでexecで実行してみる(syntax errorが見れる) 805 $result = exec("php -l " . $file_path); 806 //Errors parsingがあったらエラーを投げる 807 if(strpos($result, 'Errors parsing') !== false){ 808 $arrErr[$key] = '※ ' . $file_path .'のソース内にエラーが発見されました<br/>'; 809 } else { 810 require $file_path; 811 } 809 812 } else { 810 813 $arrErr[$key] = '※ ' . $file_path .'の読み込みに失敗しました。<br/>';
Note: See TracChangeset
for help on using the changeset viewer.