? admin_sit_1.patch ? admin_sit_2.patch ? cache_clear_menuinc_1.patch ? db_backtrace_26.patch ? files ? login_link_fix_1.patch ? login_link_fix_2.patch ? login_link_fix_3.patch ? menu_split_1.patch ? menu_update_20.patch ? menu_update_21.patch ? menu_update_22.patch ? node_load_14.patch ? patch_166.txt ? prim_sec_blocks_1.patch ? sites ? uid_node_access_55.patch ? uid_node_access_56.patch ? uninstall_remove.patch Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.5 diff -u -p -r1.5 system.admin.inc --- modules/system/system.admin.inc 26 Aug 2007 16:41:02 -0000 1.5 +++ modules/system/system.admin.inc 29 Aug 2007 02:56:40 -0000 @@ -21,28 +21,35 @@ function system_main_admin_page($arg = N if (system_status(TRUE)) { drupal_set_message(t('One or more problems were detected with your Drupal installation. Check the status report for more information.', array('@status' => url('admin/logs/status'))), 'error'); } - $result = db_query(" - SELECT * - FROM {menu_links} ml - INNER JOIN {menu_router} m ON ml.router_path = m.path - WHERE ml.link_path like 'admin/%' AND ml.link_path != 'admin/help' AND ml.depth = 2 AND ml.menu_name = 'navigation' AND hidden = 0 - ORDER BY p1 ASC, p2 ASC, p3 ASC"); $blocks = array(); - while ($item = db_fetch_array($result)) { - _menu_link_translate($item); - if (!$item['access']) { - continue; - } - $block = $item; - $block['content'] = ''; - if ($item['block_callback'] && function_exists($item['block_callback'])) { - $function = $item['block_callback']; - $block['content'] .= $function(); - } - $block['content'] .= theme('admin_block_content', system_admin_menu_block($item)); - $blocks[] = $block; + if ($admin = db_fetch_array(db_query("SELECT menu_name, mlid FROM {menu_links} WHERE link_path = 'admin' AND module = 'system'"))) { + $result = db_query(" + SELECT m.*, ml.* + FROM {menu_links} ml + INNER JOIN {menu_router} m ON ml.router_path = m.path + WHERE ml.link_path != 'admin/help' AND ml.link_path LIKE 'admin/%%' AND menu_name = '%s' AND ml.plid = %d AND hidden = 0", $admin); + while ($item = db_fetch_array($result)) { + _menu_link_translate($item); + if (!$item['access']) { + continue; + } + $block = $item; + $block['content'] = ''; + if ($item['block_callback'] && function_exists($item['block_callback'])) { + $function = $item['block_callback']; + $block['content'] .= $function(); + } + $block['content'] .= theme('admin_block_content', system_admin_menu_block($item)); + $blocks[(50000 + $item['weight']) .' '. $item['title'] .' '. $item['mlid']] = $block; + } + } + if ($blocks) { + ksort($blocks); + return theme('admin_page', $blocks); + } + else { + return t('You do not have any administrative items.'); } - return theme('admin_page', $blocks); } @@ -123,7 +130,7 @@ function system_settings_overview() { /** * Form builder; This function allows selection of the theme to show in administration sections. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -156,7 +163,7 @@ function system_admin_theme_settings() { /** * Menu callback; displays a listing of all themes. - * + * * @ingroup forms * @see system_themes_form_submt(). */ @@ -280,7 +287,7 @@ function system_themes_form_submit($form /** * Form builder; display theme configuration for entire site and individual themes. - * + * * @ingroup forms * @see system_theme_settings_submit(). */ @@ -675,7 +682,7 @@ function system_modules_disable($form, $ * elements: the list of dependencies and the list of status * form field values from the previous screen. * @ingroup forms - * @see + * @see */ function system_modules_confirm_form($modules, $storage) { $form = array(); @@ -989,7 +996,7 @@ function system_modules_uninstall_submit /** * Form builder; The general site information form. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1047,7 +1054,7 @@ function system_site_information_setting /** * Form builder; Configure error reporting settings. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1094,7 +1101,7 @@ function system_logging_overview() { /** * Form builder; Configure site performance settings. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1197,7 +1204,7 @@ function system_performance_settings() { /** * Form builder; Configure the site file handling. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1234,7 +1241,7 @@ function system_file_system_settings() { /** * Form builder; Configure site image toolkit usage. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1259,7 +1266,7 @@ function system_image_toolkit_settings() /** * Form builder; Configure how the site handles RSS feeds. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1285,7 +1292,7 @@ function system_rss_feeds_settings() { /** * Form builder; Configure the site date and time settings. - * + * * @ingroup forms * @see system_settings_form(). * @see system_date_time_settings(). @@ -1455,7 +1462,7 @@ function system_date_time_lookup() { /** * Form builder; Configure the site's maintenance status. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1481,7 +1488,7 @@ function system_site_maintenance_setting /** * Form builder; Configure Clean URL settings. - * + * * @ingroup forms * @see system_settings_form(). */ @@ -1781,7 +1788,7 @@ function theme_system_admin_by_module($m /** * Theme status report - * + * * @ingroup themeable */ function theme_status_report(&$requirements) { @@ -1816,7 +1823,7 @@ function theme_status_report(&$requireme /** * Theme call back for the modules form. - * + * * @ingroup themeable */ function theme_system_modules($form) { Index: modules/system/system.module =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.module,v retrieving revision 1.524 diff -u -p -r1.524 system.module --- modules/system/system.module 26 Aug 2007 16:41:02 -0000 1.524 +++ modules/system/system.module 29 Aug 2007 02:56:41 -0000 @@ -436,21 +436,21 @@ function system_user($type, $edit, &$use function system_admin_menu_block($item) { $content = array(); if (!isset($item['mlid'])) { - $item['mlid'] = db_result(db_query("SELECT mlid FROM {menu_links} ml WHERE ml.router_path = '%s' AND menu_name = 'navigation'", $item['path'])); + $item += db_fetch_array(db_query("SELECT mlid, menu_name FROM {menu_links} ml WHERE ml.router_path = '%s' AND module = 'system'", $item['path'])); } $result = db_query(" - SELECT * + SELECT m.*, ml.* FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path - WHERE ml.plid = %d AND ml.menu_name = 'navigation' AND hidden = 0 - ORDER BY m.weight, m.title", $item['mlid']); + WHERE ml.plid = %d AND ml.menu_name = '%s' AND hidden = 0", $item['mlid'], $item['menu_name']); while ($item = db_fetch_array($result)) { _menu_link_translate($item); if (!$item['access']) { continue; } - $content[] = (array)$item; + $content[(50000 + $item['weight']) .' '. $item['title'] .' '. $item['mlid']] = (array)$item; } + ksort($content); return $content; }