Changeset 9449 for extensions/PWG_Stuffs/admin/manage.inc.php
- Timestamp:
- Mar 1, 2011, 1:00:44 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/admin/manage.inc.php
r9410 r9449 30 30 pwg_query(' 31 31 UPDATE ' . STUFFS_TABLE . ' 32 SET datas = "'.addslashes(serialize( array('hide' => isset($_POST['hidemb'])))).'"32 SET datas = "'.addslashes(serialize(!isset($_POST['hidemb']))).'" 33 33 WHERE id=0;'); 34 34 … … 60 60 $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block'); 61 61 62 $missing = false; 62 $missing_message = ''; 63 if ($module['path'] == PHPWG_PLUGINS_PATH.'piclens/stuffs_module/' and !file_exists(PICLENS_PATH.'stuffs_module/main.inc.php')) 64 { 65 $missing_message = l10n('stuffs_piclens_need_upgrade'); 66 } 63 67 if (!empty($module['path'])) 64 68 { 65 69 preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match); 66 $missing = !isset($pwg_loaded_plugins[$match[1]]); 70 if (!isset($pwg_loaded_plugins[$match[1]])) 71 { 72 $missing_message = l10n('stuffs_parent_plugin_is_missing'); 73 } 67 74 } 68 75 … … 80 87 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'], 81 88 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 82 'MISSING' => $missing ,89 'MISSING' => $missing_message, 83 90 ) 84 91 ); 85 92 86 if (empty($module['path']) and !empty($module['datas']))93 if (empty($module['path'])) 87 94 { 88 $ datas= unserialize($module['datas']);89 $template->assign('HIDEMB', $datas['hide']);95 $show = unserialize($module['datas']); 96 $template->assign('HIDEMB', !$show); 90 97 } 91 98 }
Note: See TracChangeset
for help on using the changeset viewer.