Commit 99458217 authored by Dries's avatar Dries

- Patch #73599 by drumm: proper access checking.

parent e9ed722f
......@@ -1737,7 +1737,7 @@ function node_add($type) {
else {
// If no (valid) node type has been provided, display a node type overview.
foreach (node_get_types() as $type => $name) {
if (module_invoke(node_get_base($type), 'access', 'create', $type)) {
if (node_access('create', $type)) {
$out = '<dt>'. l($name, "node/add/$type", array('title' => t('Add a new %s.', array('%s' => $name)))) .'</dt>';
$out .= '<dd>'. implode("\n", module_invoke_all('help', 'node/add#'. $type)) .'</dd>';
$item[$name] = $out;
......
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