Bleh. :( Sorry. One last time and I'll get the commit message right, I swear. :P
parent
e42209f753
commit
74215ea2bb
|
@ -60,7 +60,7 @@ function node_add($type) {
|
||||||
$types = node_type_get_types();
|
$types = node_type_get_types();
|
||||||
$type = isset($type) ? str_replace('-', '_', $type) : NULL;
|
$type = isset($type) ? str_replace('-', '_', $type) : NULL;
|
||||||
// If a node type has been specified, validate its existence.
|
// If a node type has been specified, validate its existence.
|
||||||
if (isset($types[$type])) {
|
if (isset($types[$type]) && node_access('create', $type)) {
|
||||||
// Initialize settings:
|
// Initialize settings:
|
||||||
$node = (object)array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');
|
$node = (object)array('uid' => $user->uid, 'name' => (isset($user->name) ? $user->name : ''), 'type' => $type, 'language' => '');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue