Changeset 9410 for extensions/PWG_Stuffs/admin
- Timestamp:
- Feb 28, 2011, 10:50:28 AM (13 years ago)
- Location:
- extensions/PWG_Stuffs/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PWG_Stuffs/admin/add_module.inc.php
r9383 r9410 72 72 73 73 $query = ' 74 INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, path, parent,datas, users, groups, show_title, on_home, on_root, on_cats, on_picture, id_line, width )74 INSERT INTO ' . STUFFS_TABLE . ' ( id, pos, name, descr, path, datas, users, groups, show_title, on_home, on_root, on_cats, on_picture, id_line, width ) 75 75 VALUES (' . $next_element_id . ' , 76 76 ' . $pos . ', … … 78 78 ' . $desc . ', 79 79 "' . $module_path . '", 80 ' . (isset($modules[$module_path]['parent']) ? '"'.$modules[$module_path]['parent'].'"' : 'NULL') .',81 80 ' . $sav_datas . ', 82 81 ' . $users . ', -
extensions/PWG_Stuffs/admin/admin.php
r9383 r9410 7 7 load_language('plugin.lang', STUFFS_PATH); 8 8 include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); 9 include_once(STUFFS_PATH . ' include/functions.inc.php');9 include_once(STUFFS_PATH . 'functions.inc.php'); 10 10 $my_base_url = get_admin_plugin_menu_link(__FILE__); 11 11 … … 42 42 { 43 43 $module['path'] = PHPWG_ROOT_PATH.trim($module['path'], './').'/'; 44 45 if (preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match) and $match[1] != 'PWG_Stuffs')46 {47 $module['parent'] = $match[1];48 }49 44 $modules[$module['path']] = $module; 50 45 } -
extensions/PWG_Stuffs/admin/manage.inc.php
r9383 r9410 37 37 38 38 // Display 39 $q = 'SELECT id, name, descr, path, parent,id_line, width, datas39 $q = 'SELECT id, name, descr, path, id_line, width, datas 40 40 FROM ' . STUFFS_TABLE . ' 41 41 ORDER BY pos ASC;'; … … 60 60 $module['name'] = !empty($module['path']) ? $module['name'] : l10n('stuffs_main_block'); 61 61 62 $missing = false; 63 if (!empty($module['path'])) 64 { 65 preg_match('#^'.preg_quote(PHPWG_PLUGINS_PATH).'([^/]*?)/#', $module['path'], $match); 66 $missing = !isset($pwg_loaded_plugins[$match[1]]); 67 } 68 62 69 $template->append('modules', array( 63 70 'ID' => $module['id'], … … 73 80 'U_EDIT' => PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&tab=edit_module&edit='.$module['id'], 74 81 'U_DELETE' => !is_adviser() ? PHPWG_ROOT_PATH . 'admin.php?page=plugin&section=' . STUFFS_DIR . '%2Fadmin%2Fadmin.php&del=' . $module['id'] : '', 75 'MISSING' => (isset($module['parent']) and !isset($pwg_loaded_plugins[$module['parent']])),82 'MISSING' => $missing, 76 83 ) 77 84 ); -
extensions/PWG_Stuffs/admin/upgrade.inc.php
r9383 r9410 92 92 $query = 'ALTER TABLE ' . $prefixeTable . 'stuffs 93 93 CHANGE `type` `path` VARCHAR( 255 ) NULL DEFAULT NULL, 94 ADD `parent` VARCHAR( 255 ) NULL DEFAULT NULL AFTER `path`,95 94 ADD `level` TINYINT( 3 ) NOT NULL default "0" AFTER `groups`, 96 95 ADD `on_root` enum(\'true\',\'false\') NOT NULL AFTER `on_home`
Note: See TracChangeset
for help on using the changeset viewer.