Commit 7b713737 authored by Dries's avatar Dries

- Patch #44298 by DriesK: prevent unaccessible links from being generated.

parent 0c4e12ae
......@@ -1784,7 +1784,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 (node_access('create', $type)) {
if (module_invoke(node_get_base($type), '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;
......
......@@ -1784,7 +1784,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 (node_access('create', $type)) {
if (module_invoke(node_get_base($type), '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