Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a94f7673
Commit
a94f7673
authored
Aug 14, 2008
by
Dries
Browse files
- Patch
#56173
by catch, chx: if the user has access to one content type only, jump to that page.
parent
77375441
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/node/node.pages.inc
View file @
a94f7673
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment