Changeset 20870
- Timestamp:
- 2011/04/20 16:13:08 (13 years ago)
- bzr:base-revision:
- svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/version-2_11-dev:20869
- bzr:committer:
- Kentaro Ohkouchi <ohkouchi@loop-az.jp>
- bzr:file-ids:
data/Smarty/templates/admin/system/plugin.tpl 18949@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2FSmarty%2Ftemplates%2Fadmin%2Fsystem%2Fplugin.tpl
data/class/helper/SC_Helper_Plugin.php 18913@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2Fhelper%2FSC_Helper_Plugin.php
data/class/pages/admin/LC_Page_Admin.php 15280@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2Fpages%2Fadmin%2FLC_Page_Admin.php
data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php 18933@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcamp%2Fcamp-2_5-E%2Fdata%2Fclass%2Fpages%2Fadmin%2Fsystem%2FLC_Page_Admin_System_Plugin.php
html/install/sql/create_table_mysql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_mysql.sql
html/install/sql/create_table_pgsql.sql 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Finstall%2Fsql%2Fcreate_table_pgsql.sql- bzr:mapping-version:
- v4
- bzr:merge:
ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f- bzr:repository-uuid:
- 1e3b908f-19a9-db11-a64c-001125224ba8
- bzr:revision-id:
- ohkouchi@loop-az.jp-20110420071305-b734t36r0p852crv
- bzr:revno:
- 3581
- bzr:revprop:branch-nick:
- branches/version-2_11-dev
- bzr:root:
- branches/version-2_11-dev
- bzr:text-revisions:
data/Smarty/templates/admin/system/plugin.tpl ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f
data/class/helper/SC_Helper_Plugin.php ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f
data/class/pages/admin/LC_Page_Admin.php ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f
data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f
html/install/sql/create_table_mysql.sql ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f
html/install/sql/create_table_pgsql.sql ohkouchi@loop-az.jp-20110420071045-smb0kz6k8uhe0i8f- bzr:timestamp:
- 2011-04-20 16:13:05.654000044 +0900
- bzr:user-agent:
- bzr2.2.1+bzr-svn1.0.4
- svn:original-date:
- 2011-04-20T07:13:05.654000Z
- Location:
- branches/version-2_11-dev
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/Smarty/templates/admin/system/plugin.tpl
r20764 r20870 57 57 <colgroup width="28%"> 58 58 <colgroup width="7%"> 59 <colgroup width="10%"> 59 <colgroup width="5%"> 60 <colgroup width="5%"> 60 61 <colgroup width="5%"> 61 62 <tr> 62 <th 63 <th>プラグイン名</th> 63 64 <th>作者</th> 64 65 <th>サイトURL</th> … … 67 68 <th>操作</th> 68 69 <th>設定</th> 70 <th>移動</th> 69 71 </tr> 70 72 <!--{section name=data loop=$plugins}--> … … 100 102 <!--{/if}--> 101 103 </td> 102 104 <td align="center"> 105 <!--{if $smarty.section.data.iteration != 1}--> 106 <a href="?" onclick="fnModeSubmit('up','plugin_id', '<!--{$plugins[data].plugin_id}-->'); return false;">上へ</a> 107 <!--{/if}--> 108 <!--{if $smarty.section.data.iteration != $smarty.section.data.last}--> 109 <a href="?" onclick="fnModeSubmit('down','plugin_id', '<!--{$plugins[data].plugin_id}-->'); return false;">下へ</a> 110 <!--{/if}--> 111 </td> 103 112 </tr> 104 113 <!--{/section}--> -
branches/version-2_11-dev/data/class/helper/SC_Helper_Plugin.php
r20764 r20870 40 40 $table = "dtb_plugin"; 41 41 $where = "enable = 1 AND del_flg = 0"; 42 // XXX 2.11.0 互換のため 43 $arrCols = $objQuery->listTableFields($table); 44 if (in_array('rank', $arrCols)) { 45 $objQuery->setOrder('rank'); 46 } 42 47 $arrRet = $objQuery->select($col, $table, $where); 43 48 $class_name = get_class($lcpage); 44 49 45 // 実行されたぺーじ46 50 // 現在のページで使用するプラグインが存在するかどうかを検証する 47 51 foreach ($arrRet as $plugins){ 48 52 // プラグインを稼働させるクラス名のリストを取得する 49 53 // プラグインのディレクトリ内の設定ファイルを参照する 50 $plugin_name = $plugins[' name'];54 $plugin_name = $plugins['plugin_name']; 51 55 $plugin_class_name = $plugins['class_name']; 52 require_once DATA_REALDIR."plugin/{$plugin_name}/{$plugin_class_name}.php";56 $plugin_path = DATA_REALDIR . "plugin/{$plugin_name}/{$plugin_class_name}.php"; 53 57 54 $code_str = "\$is_enable = {$plugin_class_name}::isEnable(\$class_name);"; 55 eval($code_str); 56 if ($is_enable) { 57 $arrPluginList[] = $plugin_class_name; 58 if (file_exists($plugin_path)) { 59 require_once $plugin_path; 60 if (class_exists($class_name)) { 61 $code_str = "\$is_enable = {$plugin_class_name}::isEnable(\$class_name);"; 62 eval($code_str); 63 if ($is_enable) { 64 $arrPluginList[] = $plugin_class_name; 65 GC_Utils_Ex::gfDebugLog($class_name . ' で、プラグイン ' . $plugin_name . ' をロードしました'); 66 } else { 67 GC_Utils_Ex::gfDebugLog($class_name . ' で、プラグイン ' . $plugin_name . ' は無効になっています'); 68 } 69 } else { 70 GC_Utils_Ex::gfDebugLog('プラグイン ' . $plugin_name . ' の ' . $class_name . ' が見つかりませんでした'); 71 } 72 } else { 73 GC_Utils_Ex::gfDebugLog('プラグイン ' . $plugin_name . " が読み込めませんでした。\n" 74 . 'Failed opening required ' . $plugin_path); 58 75 } 59 76 } … … 96 113 $table = 'dtb_plugin'; 97 114 $where = 'enable = 1 AND del_flg = 0'; 115 // XXX 2.11.0 互換のため 116 $arrCols = $objQuery->listTableFields($table); 117 if (in_array('rank', $arrCols)) { 118 $objQuery->setOrder('rank DESC'); 119 } 98 120 $arrRet = $objQuery->select($col,$table,$where); 99 121 return $arrRet; … … 108 130 $table = 'dtb_plugin'; 109 131 $where = 'del_flg = 0'; 132 // XXX 2.11.0 互換のため 133 $arrCols = $objQuery->listTableFields($table); 134 if (in_array('rank', $arrCols)) { 135 $objQuery->setOrder('rank DESC'); 136 } 110 137 $arrRet = $objQuery->select($col,$table,$where); 111 138 return $arrRet; -
branches/version-2_11-dev/data/class/pages/admin/LC_Page_Admin.php
r20823 r20870 66 66 67 67 // プラグインクラス生成 68 //$this->objPlagin = new SC_Helper_Plugin_Ex();69 //$this->objPlagin->preProcess($this);68 $this->objPlagin = new SC_Helper_Plugin_Ex(); 69 $this->objPlagin->preProcess($this); 70 70 71 71 // トランザクショントークンの検証と生成 … … 88 88 */ 89 89 function sendResponse() { 90 if (isset($this->objPlagin)) { // FIXME モバイルエラー応急対応 91 // post-prosess処理(暫定的) 92 $this->objPlagin->process($this); 93 } 90 94 $this->objDisplay->prepare($this, true); 91 95 $this->objDisplay->response->write(); -
branches/version-2_11-dev/data/class/pages/admin/system/LC_Page_Admin_System_Plugin.php
r20764 r20870 119 119 } 120 120 break; 121 case 'up': 122 $this->arrErr = $objFormParam->checkError(); 123 if(count($this->arrErr) == 0) { 124 $plugin_id = $objFormParam->getValue('plugin_id'); 125 SC_Helper_DB_Ex::sfRankUp("dtb_plugin", "plugin_id", $plugin_id); 126 SC_Response_Ex::reload(); 127 } 128 break; 129 case 'down': 130 $this->arrErr = $objFormParam->checkError(); 131 if(count($this->arrErr) == 0) { 132 $plugin_id = $objFormParam->getValue('plugin_id'); 133 SC_Helper_DB_Ex::sfRankDown("dtb_plugin", "plugin_id", $plugin_id); 134 SC_Response_Ex::reload(); 135 } 136 break; 137 121 138 default: 122 139 break; … … 269 286 $sqlval['plugin_id'] = $objQuery->nextVal('dtb_plugin_plugin_id'); 270 287 $sqlval['plugin_code'] = $plugin_code; 288 $sqlval['rank'] = 1 + $objQuery->max('rank', 'dtb_plugin'); 271 289 $sqlval['status'] = PLUGIN_STATUS_UPLOADED; 272 290 $sqlval['enable'] = PLUGIN_ENABLE_FALSE; -
branches/version-2_11-dev/html/install/sql/create_table_mysql.sql
r20566 r20870 1143 1143 plugin_setting_path varchar(255) NOT NULL DEFAULT '', 1144 1144 class_name varchar(255) NOT NULL DEFAULT '', 1145 rank int NOT NULL DEFAULT 0, 1145 1146 status smallint NOT NULL DEFAULT 0, 1146 1147 enable smallint NOT NULL DEFAULT 0, -
branches/version-2_11-dev/html/install/sql/create_table_pgsql.sql
r20566 r20870 1143 1143 plugin_setting_path text NOT NULL DEFAULT '', 1144 1144 class_name text NOT NULL DEFAULT '', 1145 rank int NOT NULL DEFAULT 0, 1145 1146 status smallint NOT NULL DEFAULT 0, 1146 1147 enable smallint NOT NULL DEFAULT 0,
Note: See TracChangeset
for help on using the changeset viewer.