Commit a94f7673 authored by Dries's avatar Dries

- Patch #56173 by catch, chx: if the user has access to one content type only, jump to that page.

parent 77375441
......@@ -18,6 +18,11 @@ function node_page_edit($node) {
function node_add_page() {
$item = menu_get_item();
$content = system_admin_menu_block($item);
// Bypass the node/add listing if only one content type is available.
if (count($content) == 1) {
$item = array_shift($content);
drupal_goto($item['href']);
}
return theme('node_add_list', $content);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment