summaryrefslogtreecommitdiff
path: root/modules/system/system.admin.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-05-27 20:31:13 +0000
committerDries Buytaert <dries@buytaert.net>2007-05-27 20:31:13 +0000
commita8ceb7613b808c1b6643e910f96dc7319012bf67 (patch)
tree3965e8935437879f60b6cdddc995cf27282d5567 /modules/system/system.admin.inc
parent860947d3c87e8ebd53031ac8077d1dce24716e32 (diff)
downloadbrdo-a8ceb7613b808c1b6643e910f96dc7319012bf67.tar.gz
brdo-a8ceb7613b808c1b6643e910f96dc7319012bf67.tar.bz2
- Patch #145058 by pwolanin (and chx): re-parenting and caching for menu links.
Diffstat (limited to 'modules/system/system.admin.inc')
-rw-r--r--modules/system/system.admin.inc19
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 41ed65edb..e5c0370b4 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -15,18 +15,21 @@ function system_main_admin_page($arg = NULL) {
if (system_status(TRUE)) {
drupal_set_message(t('One or more problems were detected with your Drupal installation. Check the <a href="@status">status report</a> 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.href like 'admin/%' AND ml.href != 'admin/help' AND ml.depth = 2 AND ml.menu_name = 'navigation'
- ORDER BY p1 ASC, p2 ASC, p3 ASC");
- while ($item = db_fetch_object($result)) {
+ $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");
+ while ($item = db_fetch_array($result)) {
_menu_link_translate($item);
- if (!$item->access) {
+ if (!$item['access']) {
continue;
}
- $block = (array)$item;
+ $block = $item;
$block['content'] = '';
- if ($item->block_callback && function_exists($item->block_callback)) {
- $function = $item->block_callback;
+ 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));