Ignore:
Timestamp:
2012/02/23 15:34:37 (12 years ago)
Author:
h_yoshimoto
Message:

#1603 #1632 プラグイン仕様変更に伴う修正

Location:
branches/version-2_12-dev/data/class/pages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/LC_Page.php

    r21514 r21546  
    121121 
    122122        // HeadNaviにpluginテンプレートを追加する. 
    123         $objTemplateTransformList = SC_Plugin_TemplateTransformList::getSingletonInstance(); 
    124         $objTemplateTransformList->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']); 
    125  
    126         // plugin側で生成したページがあるかを検証し、ある場合は tpl_mainpage にセットする. 
    127123        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    128         $plugin_tmplpath = $objPlugin->getPluginTemplateCachePath($this); 
    129         if (file_exists($plugin_tmplpath)) $this->tpl_mainpage = $plugin_tmplpath; 
     124        $objPlugin->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']); 
    130125 
    131126        // スーパーフックポイントを実行. 
    132         $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    133127        $objPlugin->doAction('lc_page_process', array($this)); 
    134128 
  • branches/version-2_12-dev/data/class/pages/admin/LC_Page_Admin.php

    r21515 r21546  
    9292        if ($_SERVER['PHP_SELF'] !== ROOT_URLPATH . ADMIN_DIR . 'system/plugin.php') { 
    9393 
    94             // プラグインによってトランスフォームされたテンプレートがあればセットする 
     94            // HeadNaviにpluginテンプレートを追加する. 
    9595            $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    96             $plugin_tmplpath = $objPlugin->getPluginTemplateCachePath($this); 
    97             if (file_exists($plugin_tmplpath)) $this->tpl_mainpage = $plugin_tmplpath; 
     96            $objPlugin->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']); 
    9897 
    9998            // スーパーフックポイントを実行. 
    100             $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    10199            $objPlugin->doAction('lc_page_process', array($this)); 
    102  
    103             // HeadNaviにpluginテンプレートを追加する. 
    104             $objTemplateTransformList = SC_Plugin_TemplateTransformList::getSingletonInstance(); 
    105             $objTemplateTransformList->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']); 
    106100        } 
    107101 
  • branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php

    r21527 r21546  
    6969        // パラメーター管理クラス 
    7070        $objFormParam = new SC_FormParam_Ex(); 
     71        $mode = $this->getMode();    
    7172        // パラメーター情報の初期化 
    72         $this->lfInitParam($objFormParam); 
     73        $this->lfInitParam($objFormParam, $mode); 
    7374        $objFormParam->setParam($_POST); 
    7475 
     
    9091                        $this->arrErr = $this->installPlugin($plugin_code, $plugin_file_name); 
    9192                        if ($this->isError($this->arrErr) === false) { 
    92                             // テンプレート再生成. 
    93                             $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    94                             $objPlugin->remakeTemplate(); 
     93                            // コンパイルファイルのクリア処理 
     94                            SC_Utils_Ex::clearCompliedTemplate(); 
    9595                            $this->tpl_onload = "alert('プラグインをインストールしました。');"; 
    9696                        } 
     
    112112                    // 完了メッセージアラート設定. 
    113113                    if ($this->isError($this->arrErr) === false) { 
    114                         // テンプレート再生成. 
    115                         $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    116                         $objPlugin->remakeTemplate(); 
     114                        // コンパイルファイルのクリア処理 
     115                        SC_Utils_Ex::clearCompliedTemplate(); 
    117116                        $this->tpl_onload = "alert('" . $plugin['plugin_name'] ."を削除しました。');"; 
    118117                    } 
     
    130129                    $this->arrErr = $this->enablePlugin($plugin_id, $plugin['plugin_code']);                     
    131130                    if ($this->isError($this->arrErr) === false) { 
    132                         // テンプレート再生成. 
    133                         $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    134                         $objPlugin->remakeTemplate(); 
     131                        // コンパイルファイルのクリア処理 
     132                        SC_Utils_Ex::clearCompliedTemplate(); 
    135133                        $this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を有効にしました。');"; 
    136134                    } 
     
    148146                    $this->arrErr = $this->disablePlugin($plugin_id, $plugin['plugin_code']);                     
    149147                    if ($this->isError($this->arrErr) === false) { 
    150                         // テンプレート再生成. 
    151                         $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    152                         $objPlugin->remakeTemplate(); 
     148                        // コンパイルファイルのクリア処理 
     149                        SC_Utils_Ex::clearCompliedTemplate(); 
    153150                        $this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を無効にしました。');"; 
    154151                    } 
     
    172169                            $this->arrErr = $this->updatePlugin($plugin_code, $update_plugin_file_name, $plugin_code, $objFormParam->getValue('plugin_id')); 
    173170                            if ($this->isError($this->arrErr) === false) { 
    174                                 // テンプレート再生成. 
    175                                 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    176                                 $objPlugin->remakeTemplate(); 
     171                                // コンパイルファイルのクリア処理 
     172                                SC_Utils_Ex::clearCompliedTemplate(); 
    177173                                $this->tpl_onload = "alert('プラグインをアップデートしました。');"; 
    178174                            } 
     
    192188                    $priority = $objFormParam->getValue('priority'); 
    193189                    $this->updatePriority($plugin_id, $priority); 
    194                     // テンプレート再生成. 
    195                     $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    196                     $objPlugin->remakeTemplate(); 
     190                    // コンパイルファイルのクリア処理 
     191                    SC_Utils_Ex::clearCompliedTemplate(); 
    197192                } else { 
    198193                    // エラーメッセージを詰め直す. 
     
    231226     * パラメーター初期化. 
    232227     * 
    233      * @param object $objFormParam 
     228     * @param SC_FormParam_Ex $objFormParam 
     229     * @param string $mode モード 
    234230     * @return void 
    235      *  
    236      */ 
    237     function lfInitParam(&$objFormParam) { 
     231     */ 
     232    function lfInitParam(&$objFormParam, $mode) { 
    238233        $objFormParam->addParam('mode', 'mode', INT_LEN, '', array('ALPHA_CHECK', 'MAX_LENGTH_CHECK')); 
    239234        $objFormParam->addParam('plugin_id', 'plugin_id', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    240235        $objFormParam->addParam('plugin_code', 'plugin_code', MTEXT_LEN, '', array('ALPHA_CHECK', 'MAX_LENGTH_CHECK')); 
    241         $objFormParam->addParam('優先度', 'priority', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
     236        if($mode === "priority"){ 
     237            $objFormParam->addParam('優先度', 'priority', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')); 
     238        } 
    242239    } 
    243240 
     
    245242     * ファイルパラメーター初期化. 
    246243     * 
    247      * @param object $objUpFile SC_UploadFileのインスタンス. 
     244     * @param SC_UploadFile_Ex $objUpFile SC_UploadFileのインスタンス. 
    248245     * @param string $key 登録するキー. 
    249246     * @return void 
     
    738735    } 
    739736 
    740 //    /** 
    741 //     * テンプレート再生成 
    742 //     * 
    743 //     * @return void 
    744 //     */ 
    745 //    function remakeTemplate() { 
    746 //        $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 
    747 //        $objPlugin->remakeAllTemplates(true); 
    748 //        $objPlugin->remakeAllTemplates(); 
    749 //    } 
    750  
    751737    /** 
    752738     * plugin_idをキーにdtb_pluginのstatusを更新します. 
     
    852838     * 
    853839     * @param string $dir_path 作成するディレクトリのパス 
     840     * @return void 
    854841     */ 
    855842    function makeDir($dir_path) { 
Note: See TracChangeset for help on using the changeset viewer.