Changeset 21546 for branches/version-2_12-dev/data/class/pages
- Timestamp:
- 2012/02/23 15:34:37 (12 years ago)
- 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 121 121 122 122 // HeadNaviにpluginテンプレートを追加する. 123 $objTemplateTransformList = SC_Plugin_TemplateTransformList::getSingletonInstance();124 $objTemplateTransformList->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']);125 126 // plugin側で生成したページがあるかを検証し、ある場合は tpl_mainpage にセットする.127 123 $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']); 130 125 131 126 // スーパーフックポイントを実行. 132 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance();133 127 $objPlugin->doAction('lc_page_process', array($this)); 134 128 -
branches/version-2_12-dev/data/class/pages/admin/LC_Page_Admin.php
r21515 r21546 92 92 if ($_SERVER['PHP_SELF'] !== ROOT_URLPATH . ADMIN_DIR . 'system/plugin.php') { 93 93 94 // プラグインによってトランスフォームされたテンプレートがあればセットする94 // HeadNaviにpluginテンプレートを追加する. 95 95 $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']); 98 97 99 98 // スーパーフックポイントを実行. 100 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance();101 99 $objPlugin->doAction('lc_page_process', array($this)); 102 103 // HeadNaviにpluginテンプレートを追加する.104 $objTemplateTransformList = SC_Plugin_TemplateTransformList::getSingletonInstance();105 $objTemplateTransformList->setHeadNaviBlocs($this->arrPageLayout['HeadNavi']);106 100 } 107 101 -
branches/version-2_12-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php
r21527 r21546 69 69 // パラメーター管理クラス 70 70 $objFormParam = new SC_FormParam_Ex(); 71 $mode = $this->getMode(); 71 72 // パラメーター情報の初期化 72 $this->lfInitParam($objFormParam );73 $this->lfInitParam($objFormParam, $mode); 73 74 $objFormParam->setParam($_POST); 74 75 … … 90 91 $this->arrErr = $this->installPlugin($plugin_code, $plugin_file_name); 91 92 if ($this->isError($this->arrErr) === false) { 92 // テンプレート再生成. 93 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 94 $objPlugin->remakeTemplate(); 93 // コンパイルファイルのクリア処理 94 SC_Utils_Ex::clearCompliedTemplate(); 95 95 $this->tpl_onload = "alert('プラグインをインストールしました。');"; 96 96 } … … 112 112 // 完了メッセージアラート設定. 113 113 if ($this->isError($this->arrErr) === false) { 114 // テンプレート再生成. 115 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 116 $objPlugin->remakeTemplate(); 114 // コンパイルファイルのクリア処理 115 SC_Utils_Ex::clearCompliedTemplate(); 117 116 $this->tpl_onload = "alert('" . $plugin['plugin_name'] ."を削除しました。');"; 118 117 } … … 130 129 $this->arrErr = $this->enablePlugin($plugin_id, $plugin['plugin_code']); 131 130 if ($this->isError($this->arrErr) === false) { 132 // テンプレート再生成. 133 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 134 $objPlugin->remakeTemplate(); 131 // コンパイルファイルのクリア処理 132 SC_Utils_Ex::clearCompliedTemplate(); 135 133 $this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を有効にしました。');"; 136 134 } … … 148 146 $this->arrErr = $this->disablePlugin($plugin_id, $plugin['plugin_code']); 149 147 if ($this->isError($this->arrErr) === false) { 150 // テンプレート再生成. 151 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 152 $objPlugin->remakeTemplate(); 148 // コンパイルファイルのクリア処理 149 SC_Utils_Ex::clearCompliedTemplate(); 153 150 $this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を無効にしました。');"; 154 151 } … … 172 169 $this->arrErr = $this->updatePlugin($plugin_code, $update_plugin_file_name, $plugin_code, $objFormParam->getValue('plugin_id')); 173 170 if ($this->isError($this->arrErr) === false) { 174 // テンプレート再生成. 175 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 176 $objPlugin->remakeTemplate(); 171 // コンパイルファイルのクリア処理 172 SC_Utils_Ex::clearCompliedTemplate(); 177 173 $this->tpl_onload = "alert('プラグインをアップデートしました。');"; 178 174 } … … 192 188 $priority = $objFormParam->getValue('priority'); 193 189 $this->updatePriority($plugin_id, $priority); 194 // テンプレート再生成. 195 $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance(); 196 $objPlugin->remakeTemplate(); 190 // コンパイルファイルのクリア処理 191 SC_Utils_Ex::clearCompliedTemplate(); 197 192 } else { 198 193 // エラーメッセージを詰め直す. … … 231 226 * パラメーター初期化. 232 227 * 233 * @param object $objFormParam 228 * @param SC_FormParam_Ex $objFormParam 229 * @param string $mode モード 234 230 * @return void 235 * 236 */ 237 function lfInitParam(&$objFormParam) { 231 */ 232 function lfInitParam(&$objFormParam, $mode) { 238 233 $objFormParam->addParam('mode', 'mode', INT_LEN, '', array('ALPHA_CHECK', 'MAX_LENGTH_CHECK')); 239 234 $objFormParam->addParam('plugin_id', 'plugin_id', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 240 235 $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 } 242 239 } 243 240 … … 245 242 * ファイルパラメーター初期化. 246 243 * 247 * @param object$objUpFile SC_UploadFileのインスタンス.244 * @param SC_UploadFile_Ex $objUpFile SC_UploadFileのインスタンス. 248 245 * @param string $key 登録するキー. 249 246 * @return void … … 738 735 } 739 736 740 // /**741 // * テンプレート再生成742 // *743 // * @return void744 // */745 // function remakeTemplate() {746 // $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance();747 // $objPlugin->remakeAllTemplates(true);748 // $objPlugin->remakeAllTemplates();749 // }750 751 737 /** 752 738 * plugin_idをキーにdtb_pluginのstatusを更新します. … … 852 838 * 853 839 * @param string $dir_path 作成するディレクトリのパス 840 * @return void 854 841 */ 855 842 function makeDir($dir_path) {
Note: See TracChangeset
for help on using the changeset viewer.