? cvs_get_vanilla.sh ? modules/.node.module.swp Index: modules/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.577 diff -u -p -r1.577 node.module --- modules/node.module 3 Jan 2006 19:40:29 -0000 1.577 +++ modules/node.module 3 Jan 2006 23:26:50 -0000 @@ -2158,8 +2158,10 @@ function node_form_alter($form_id, &$for * - "view" * - "update" * - "delete" + * - "create" * @param $node - * The node object (or node array) on which the operation is to be performed. + * The node object (or node array) on which the operation is to be performed, + * or node type (e.g. 'forum') for "create" operation. * @param $uid * The user ID on which the operation is to be performed. * @return @@ -2167,8 +2169,9 @@ function node_form_alter($form_id, &$for */ function node_access($op, $node = NULL, $uid = NULL) { // Convert the node to an object if necessary: - $node = (object)$node; - + if ($op != 'create') { + $node = (object)$node; + } // If the node is in a restricted format, disallow editing. if ($op == 'update' && !filter_access($node->format)) { return FALSE; @@ -2191,7 +2194,7 @@ function node_access($op, $node = NULL, // If the module did not override the access rights, use those set in the // node_access table. - if ($node->nid && $node->status) { + if ($op != 'create' && $node->nid && $node->status) { $grants = array(); foreach (node_access_grants($op, $uid) as $realm => $gids) { foreach ($gids as $gid) {