summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-10 08:34:07 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-11-10 08:34:07 +0000
commitb1a6f1d678b5797819aa06ffb991dd604164b0d6 (patch)
tree1f6413a11e131c133289e629dee92a4a8b5cda44
parentf56dd8787801295b55268cbd3a969fc5555f8e15 (diff)
downloadbrdo-b1a6f1d678b5797819aa06ffb991dd604164b0d6.tar.gz
brdo-b1a6f1d678b5797819aa06ffb991dd604164b0d6.tar.bz2
#91089 by Steven. Reshuffle the order of menus on their administration page.
-rw-r--r--modules/menu/menu.module8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/menu/menu.module b/modules/menu/menu.module
index ef733d775..b8f0bda86 100644
--- a/modules/menu/menu.module
+++ b/modules/menu/menu.module
@@ -613,7 +613,8 @@ function menu_overview_tree() {
$header = array(t('Menu item'), t('Expanded'), array('data' => t('Operations'), 'colspan' => '3'));
$output = '';
- foreach ($root_menus as $mid => $title) {
+ // We reverse the root menu to show user created menus first.
+ foreach (array_reverse($root_menus, true) as $mid => $title) {
$operations = array();
if ($menu['items'][$mid]['type'] & MENU_MODIFIABLE_BY_ADMIN) {
$operations[] = l(t('Edit'), 'admin/build/menu/menu/edit/'. $mid);
@@ -623,7 +624,10 @@ function menu_overview_tree() {
}
$operations[] = l(t('Add item'), 'admin/build/menu/item/add/'. $mid);
$table = theme('item_list', $operations);
- $table .= theme('table', $header, menu_overview_tree_rows($mid));
+
+ $rows = menu_overview_tree_rows($mid);
+ $table .= theme('table', $header, $rows ? $rows : array(array(array('data' => t('No menu items defined.'), 'colspan' => 5))));
+
$output .= theme('box', check_plain($title), $table);
}
return $output;