reverted: --- modules/shortcut/shortcut.admin.css 15 Oct 2009 04:05:14 -0000 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -/* $Id$ */ - -h4.shortcuts-set, -div.shortcuts-change-set { - display: inline; -} - -.toolbar-slot-hidden { - display: none; -} - -div.form-item-set div.form-item-new { - display: inline; -} diff -u modules/shortcut/shortcut.admin.inc modules/shortcut/shortcut.admin.inc --- modules/shortcut/shortcut.admin.inc 15 Oct 2009 04:05:14 -0000 +++ modules/shortcut/shortcut.admin.inc @@ -381,7 +381,7 @@ 'link_path' => $_GET['link'], ); // Really we should test for a dupe here. - $shortcut_set['links'] = $link; + $shortcut_set['links'][] = $link; if (shortcut_set_save($shortcut_set)) { drupal_set_message(t('Added a shortcut for %title.', array('%title' => $link['link_title']))); reverted: --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ modules/toolbar/toolbar.install 13 Oct 2009 13:54:55 -0000 1.6 @@ -0,0 +1,56 @@ + 'admin_shortcuts', + 'title' => $t('Administration shortcuts'), + 'description' => $t('The Administration shortcuts menu contains commonly used links for administrative tasks.'), + ); + menu_save($menu); + + // Add starter convenience shortcuts. + menu_rebuild(); + $items = array( + 'node/add' => 'Add content', + 'admin/content' => 'Find content', + 'admin/dashboard' => 'Dashboard', + ); + $weight = -20; + foreach ($items as $path => $title) { + $link = array( + 'mlid' => 0, + 'link_title' => $title, + 'link_path' => $path, + 'router_path' => $path, + 'menu_name' => 'admin_shortcuts', + 'module' => 'menu', + 'weight' => $weight, + ); + + // Check for an existing menu item before attempting to create a new one. + $menu_link = db_query("SELECT mlid FROM {menu_links} WHERE link_path = :path AND menu_name = :menu_name", array( + ':path' => $link['link_path'], + ':menu_name' => $link['menu_name'] + )) + ->fetchField(); + if (!$menu_link) { + menu_link_save($link); + } + + // Increment weight so items can be displayed in desired order. + $weight++; + } +}