Changeset 7540 for extensions/PWG_Stuffs/admin/add_module.php
- Timestamp:
- Nov 1, 2010, 3:16:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/admin/add_module.php
r6230 r7540 9 9 load_language('plugin.lang', STUFFS_PATH); 10 10 11 if (!isset($_GET['type']) or !is_dir(STUFFS_PATH . 'modules/' . $_GET['type']))11 if (!isset($_GET['type']) or ($_GET['type'] != 'MainBlock' and !is_dir(STUFFS_PATH . 'modules/' . $_GET['type']))) 12 12 { 13 13 die('Wrong parameters...'); … … 24 24 if (isset($_POST['submit']) and !is_adviser()) 25 25 { 26 include(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');26 @include(STUFFS_PATH . 'modules/' . $type . '/config.inc.php'); 27 27 if (empty($page['errors'])) 28 28 { 29 if ($type == 'MainBlock') 30 { 31 $_POST['module_name'] = 'MainBlock'; 32 $_POST['show_title'] = true; 33 $_POST['on_home'] = true; 34 $_POST['on_cats'] = true; 35 $_POST['on_picture'] = true; 36 } 29 37 if (empty($_POST['module_name'])) 30 38 { … … 105 113 $template->assign(array( 106 114 'STUFFS_TITLE' => l10n('stuffs_edit_mod') . ' <i>' . trigger_event('render_stuffs_name', $module['name']) . '</i>', 115 'MODULE_ID' => $_GET['edit'], 107 116 'MODULE_NAME' => $module['name'], 108 117 'DESC_VALUE' => (isset($module['descr']) ? $module['descr'] : ''), … … 139 148 140 149 // Configuration du module 141 include_once(STUFFS_PATH . 'modules/' . $type . '/config.inc.php');150 @include_once(STUFFS_PATH . 'modules/' . $type . '/config.inc.php'); 142 151 143 152 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__) . '/template/add_module.tpl'));
Note: See TracChangeset
for help on using the changeset viewer.