Ignore:
Timestamp:
2012/03/23 16:24:29 (12 years ago)
Author:
h_yoshimoto
Message:

#1692 プラグイン設定を呼び出す処理をモジュールと同様の処理に変更

Location:
branches/version-2_12-dev
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/Smarty/templates/admin/system/plugin.tpl

    r21539 r21671  
    187187                            <!-- 設定 --> 
    188188                                <!--{if $plugin.config_flg == true && $plugin.status != $smarty.const.PLUGIN_STATUS_UPLOADED}--> 
    189                                     <a href="?" onclick="win03('<!--{$smarty.const.ROOT_URLPATH}-->plugin/<!--{$plugin.plugin_code}-->/config.php','plugin_setting','620','760'); return false;">プラグイン設定</a>&nbsp;|&nbsp; 
     189                                    <a href="?" onclick="win02('../load_plugin_config.php?plugin_id=<!--{$plugin.plugin_id}-->', 'load', 615, 400);return false;">プラグイン設定</a>&nbsp;|&nbsp; 
    190190                                <!--{else}--> 
    191191                                    <span>プラグイン設定&nbsp;|&nbsp;</span> 
  • branches/version-2_12-dev/html/admin/load_plugin_config.php

    r21515 r21671  
    33 * This file is part of EC-CUBE 
    44 * 
    5  * Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved. 
     5 * Copyright(c) 2000-2012 LOCKON CO.,LTD. All Rights Reserved. 
    66 * 
    77 * http://www.lockon.co.jp/ 
     
    2323 
    2424/** 
    25  * モジュール設定スクリプトをロードする。 
    26  * GETのクエリにmodule_idを渡す。 
     25 * プラグイン設定をロードする。 
     26 * GETのクエリにplugin_idを渡す。 
    2727 * 
    2828 * 管理画面から呼び出すことを想定しているので、 
     
    3535SC_Utils::sfIsSuccess(new SC_Session()); 
    3636 
    37 $module_id = isset($_GET['module_id']) ? $_GET['module_id'] : null; 
     37$plugin_id = isset($_GET['plugin_id']) ? $_GET['plugin_id'] : null; 
    3838 
    39 if (!empty($module_id) && is_numeric($module_id)) { 
     39if (!empty($plugin_id) && is_numeric($plugin_id)) { 
    4040 
    41     GC_Utils::gfPrintLog('loading module ====> module_id = ' . $module_id); 
    42  
    43     $objQuery = new SC_Query(); 
    44     $arrRet = $objQuery->select('module_code', 'dtb_module', 'module_id = ?', array($module_id)); 
    45  
    46     if (isset($arrRet[0]['module_code'])) { 
    47         $config_path = MODULE_REALDIR . $arrRet[0]['module_code'] . '/config.php'; 
    48  
     41    GC_Utils::gfPrintLog('loading plugin ====> plugin_id = ' . $plugin_id); 
     42    $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(false); 
     43    $plugin = $objPlugin->getPluginByPluginId($plugin_id); 
     44     
     45    if (isset($plugin['plugin_code'])) { 
     46        $config_path = PLUGIN_UPLOAD_REALDIR . $plugin['plugin_code'] . '/config.php'; 
     47         
    4948        if (file_exists($config_path)) { 
    5049            require_once $config_path; 
    5150            exit; 
    5251        } else { 
    53             die("モジュールの取得に失敗しました: $config_path"); 
     52            die("プラグインの取得に失敗しました: $config_path"); 
    5453        } 
    5554    } else { 
    56         die("モジュールが存在しません: module_id => $module_id"); 
     55        die("プラグインが存在しません: plugin_id => $plugin_id"); 
    5756    } 
    5857} 
Note: See TracChangeset for help on using the changeset viewer.