$result=db_query('SELECT m.*, me.disabled FROM {menu} m LEFT JOIN {menu_custom} me ON m.path = me.path WHERE visible = 1 OR (disabled = 1 AND admin = 0) ORDER BY mleft');
$result=db_query('SELECT m.*, me.disabled FROM {menu} m LEFT JOIN {menu_custom} me ON m.path = me.path WHERE visible = 1 OR (disabled = 1 AND admin = 0) ORDER BY mleft');
$map=arg();
$map=arg();
$rows=array();
$rows=array();
...
@@ -677,6 +650,10 @@ function _menu_form_alter(&$form, $form_id) {
...
@@ -677,6 +650,10 @@ function _menu_form_alter(&$form, $form_id) {
}
}
}
}
functionmenu_get_root_menus(){
returnarray();
}
/**
/**
* Menu callback; presents menu configuration options.
* Menu callback; presents menu configuration options.
@@ -399,11 +399,11 @@ function system_main_admin_page($arg = NULL) {
...
@@ -399,11 +399,11 @@ function system_main_admin_page($arg = NULL) {
if(system_status(TRUE)){
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');
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
$map=arg(NULL);
WHERE ml.href like 'admin/%' AND ml.href != 'admin/help' AND ml.depth = 2 AND ml.menu_name = 'navigation'
$result=db_query("SELECT * FROM {menu} WHERE path LIKE 'admin/%%' AND depth = 2 AND visible = 1 AND path != 'admin/help' ORDER BY mleft");
ORDER BY p1 ASC, p2 ASC, p3 ASC");
while($item=db_fetch_object($result)){
while($item=db_fetch_object($result)){
_menu_translate($item,$map,MENU_RENDER_LINK);
_menu_link_translate($item);
if(!$item->access){
if(!$item->access){
continue;
continue;
}
}
...
@@ -423,11 +423,14 @@ function system_main_admin_page($arg = NULL) {
...
@@ -423,11 +423,14 @@ function system_main_admin_page($arg = NULL) {
* Provide a single block on the administration overview page.
* Provide a single block on the administration overview page.
*/
*/
functionsystem_admin_menu_block($item){
functionsystem_admin_menu_block($item){
$map=arg(NULL);
$content=array();
$content=array();
$result=db_query('SELECT * FROM {menu} WHERE depth = %d AND %d < mleft AND mright < %d AND visible = 1 ORDER BY mleft',$item->depth+1,$item->mleft,$item->mright);
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)){
while($item=db_fetch_object($result)){
_menu_translate($item,$map,MENU_RENDER_LINK);
_menu_link_translate($item);
if(!$item->access){
if(!$item->access){
continue;
continue;
}
}
...
@@ -1657,6 +1660,8 @@ function system_modules_submit($form_values, $form, &$form_state) {
...
@@ -1657,6 +1660,8 @@ function system_modules_submit($form_values, $form, &$form_state) {
$dependencies=NULL;
$dependencies=NULL;
}
}
// Temporarily disable menu module while it's broken.
unset($form_values['status']['menu']);
$enable_modules=array();
$enable_modules=array();
$disable_modules=array();
$disable_modules=array();
foreach($form_values['status']as$key=>$choice){
foreach($form_values['status']as$key=>$choice){
...
@@ -1700,8 +1705,8 @@ function system_modules_submit($form_values, $form, &$form_state) {
...
@@ -1700,8 +1705,8 @@ function system_modules_submit($form_values, $form, &$form_state) {
if($old_module_list!=$current_module_list){
if($old_module_list!=$current_module_list){
drupal_rebuild_theme_registry();
drupal_rebuild_theme_registry();
menu_rebuild();
node_types_rebuild();
node_types_rebuild();
menu_rebuild();
drupal_set_message(t('The configuration options have been saved.'));
drupal_set_message(t('The configuration options have been saved.'));
}
}
...
@@ -2494,14 +2499,14 @@ function theme_admin_block_content($content) {
...
@@ -2494,14 +2499,14 @@ function theme_admin_block_content($content) {