summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/node/node.pages.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc
index 6d9be7d8c..d498a0fe0 100644
--- a/modules/node/node.pages.inc
+++ b/modules/node/node.pages.inc
@@ -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);
}