Changeset 9369 for extensions/PWG_Stuffs/admin/manage.php
- Timestamp:
- Feb 24, 2011, 4:45:43 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/admin/manage.php
r7855 r9369 3 3 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 4 4 5 // Enregistrement de l'ordre 5 global $pwg_loaded_plugins; 6 7 // Delete module 8 if (isset($_GET['del']) and !is_adviser()) 9 { 10 pwg_query('DELETE FROM ' . STUFFS_TABLE . ' WHERE id = ' . $_GET['del'] . ' LIMIT 1;'); 11 redirect(PHPWG_ROOT_PATH.'admin.php?page=plugin§ion=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php'); 12 } 13 14 // Save order 6 15 if (isset($_POST['submitOrder']) and !is_adviser()) 7 16 { … … 27 36 } 28 37 29 // Affichage des modules et de leur position30 $q = 'SELECT id, name, descr, type, id_line, width, datas38 // Display 39 $q = 'SELECT id, name, descr, path, parent, id_line, width, datas 31 40 FROM ' . STUFFS_TABLE . ' 32 41 ORDER BY pos ASC;'; … … 34 43 $num = 0; 35 44 $pos = 1; 36 $cat_mod = array('name' => l10n('Categories'), 'type' => '-', 'description' => '');37 45 $id_line_options = array( 38 46 '' => '-', … … 50 58 while ($module = mysql_fetch_assoc($result)) 51 59 { 52 $module['name'] = $module['type'] != 'MainBlock'? $module['name'] : l10n('stuffs_main_block');60 $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block'); 53 61 54 62 $template->append('modules', array( … … 56 64 'NAME' => trigger_event('render_stuffs_name', $module['name']), 57 65 'DESC' => $module['descr'], 58 ' TYPE' => $module['type'],59 'TYPE_NAME' => (isset($modules[$module[' type']]['name']) ? $modules[$module['type']]['name'] : ''),66 'PATH' => $module['path'], 67 'TYPE_NAME' => (isset($modules[$module['path']]['name']) ? $modules[$module['path']]['name'] : ''), 60 68 'POS' => 10 * $pos++, 61 69 'ID_LINE_OPTIONS' => $id_line_options, 62 70 'ID_LINE_SELECTED' => $module['id_line'], 63 64 65 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fad d_module.php&type=' . $module['type'] . '&edit=' .$module['id'],71 'WIDTH' => $module['width'], 72 'ID' => $module['id'], 73 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'], 66 74 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 67 )); 75 'MISSING' => (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']])), 76 ) 77 ); 68 78 69 if ( $module['type'] == 'MainBlock'and !empty($module['datas']))79 if (empty($module['path']) and !empty($module['datas'])) 70 80 { 71 81 $datas = unserialize($module['datas']);
Note: See TracChangeset
for help on using the changeset viewer.