? nodetype.kpf ? nodetype_form.patch ? sites/nodetype Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.568 diff -u -p -r1.568 comment.module --- modules/comment/comment.module 20 Jul 2007 08:51:13 -0000 1.568 +++ modules/comment/comment.module 22 Jul 2007 21:30:17 -0000 @@ -424,8 +424,7 @@ function comment_form_alter(&$form, $for '#description' => t('Users with the administer comments permission will be able to override this setting.'), ); } - elseif (isset($form['type']) && isset($form['#node'])) { - if ($form['type']['#value'] .'_node_form' == $form_id) { + elseif (!empty($form['#node_edit_form'])) { $node = $form['#node']; $form['comment_settings'] = array( '#type' => 'fieldset', Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.860 diff -u -p -r1.860 node.module --- modules/node/node.module 21 Jul 2007 09:55:18 -0000 1.860 +++ modules/node/node.module 22 Jul 2007 21:30:17 -0000 @@ -2128,6 +2128,8 @@ function node_form(&$form_state, $node) // Set the id of the top-level form tag $form['#id'] = 'node-form'; + $form['#node_type'] = $node->type; + $form['#node_edit_form'] = TRUE; /** * Basic node information. Index: modules/path/path.module =================================================================== RCS file: /cvs/drupal/drupal/modules/path/path.module,v retrieving revision 1.128 diff -u -p -r1.128 path.module --- modules/path/path.module 5 Jul 2007 08:48:58 -0000 1.128 +++ modules/path/path.module 22 Jul 2007 21:30:17 -0000 @@ -264,7 +264,7 @@ function path_nodeapi(&$node, $op, $arg) * Implementation of hook_form_alter(). */ function path_form_alter(&$form, $form_state, $form_id) { - if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (!empty($form['#node_edit_form'])) { $path = isset($form['#node']->path) ? $form['#node']->path : NULL; $form['path'] = array( '#type' => 'fieldset', Index: modules/taxonomy/taxonomy.module =================================================================== RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v retrieving revision 1.371 diff -u -p -r1.371 taxonomy.module --- modules/taxonomy/taxonomy.module 16 Jul 2007 12:43:06 -0000 1.371 +++ modules/taxonomy/taxonomy.module 22 Jul 2007 21:30:17 -0000 @@ -703,7 +703,7 @@ function taxonomy_get_vocabularies($type * Generate a form for selecting terms to associate with a node. */ function taxonomy_form_alter(&$form, $form_state, $form_id) { - if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) { + if (!empty($form['#node_edit_form'])) { $node = $form['#node']; if (!isset($node->taxonomy)) { Index: modules/upload/upload.module =================================================================== RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v retrieving revision 1.173 diff -u -p -r1.173 upload.module --- modules/upload/upload.module 5 Jul 2007 08:48:58 -0000 1.173 +++ modules/upload/upload.module 22 Jul 2007 21:30:17 -0000 @@ -365,9 +365,8 @@ function upload_form_alter(&$form, $form ); } - if (isset($form['type']) && isset($form['#node'])) { - $node = $form['#node']; - if ($form['type']['#value'] .'_node_form' == $form_id && variable_get("upload_$node->type", TRUE)) { + if (!empty($form['#node_edit_form'])) { + if ($node = $form['#node'] && variable_get("upload_$node->type", TRUE)) { // Attachments fieldset $form['attachments'] = array( '#type' => 'fieldset',