summaryrefslogtreecommitdiff
path: root/modules/system/system.module
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.module
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.module')
-rw-r--r--modules/system/system.module22
1 files changed, 12 insertions, 10 deletions
diff --git a/modules/system/system.module b/modules/system/system.module
index 3820d27ef..b94bc9742 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -144,6 +144,7 @@ function system_menu() {
$items['admin/by-task'] = array(
'title' => 'By task',
'page callback' => 'system_main_admin_page',
+ 'file' => 'system.admin.inc',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/by-module'] = array(
@@ -392,14 +393,18 @@ function system_user($type, $edit, &$user, $category = NULL) {
*/
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));
- }
- $result = db_query("SELECT * FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path
- WHERE ml.plid = '%s' AND ml.menu_name = 'navigation' ORDER BY m.weight, m.title", $item->mlid);
- while ($item = db_fetch_object($result)) {
+ 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']));
+ }
+ $result = db_query("
+ SELECT *
+ 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']);
+ while ($item = db_fetch_array($result)) {
_menu_link_translate($item);
- if (!$item->access) {
+ if (!$item['access']) {
continue;
}
$content[] = (array)$item;
@@ -1670,9 +1675,6 @@ function system_modules_submit($form_values, $form, &$form_state) {
}
}
- // Temporarily disable menu module while it's broken.
- unset($form_values['status']['menu']);
-
// If there where unmet dependencies and they haven't confirmed don't process
// the submission yet. Store the form submission data needed later.
if ($dependencies) {