Index: modules/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node.module,v
retrieving revision 1.468
diff -u -F^function -r1.468 node.module
--- modules/node.module	27 Feb 2005 02:54:24 -0000	1.468
+++ modules/node.module	27 Feb 2005 14:50:43 -0000
@@ -669,7 +669,7 @@ function node_menu($may_cache) {
     $items[] = array('path' => 'admin/node/configure/settings', 'title' => t('settings'),
       'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -10);
     $items[] = array('path' => 'admin/node/configure/types', 'title' => t('content types'),
-      'callback' => 'node_types',
+      'callback' => 'node_types_configure',
       'access' => user_access('administer nodes'),
       'type' => MENU_LOCAL_TASK);
     if (module_exist('search')) {
@@ -717,8 +717,6 @@ function node_menu($may_cache) {
     else if (arg(0) == 'admin' && arg(1) == 'node' && arg(2) == 'configure' && arg(3) == 'types' && is_string(arg(4))) {
       $items[] = array('path' => 'admin/node/configure/types/'. arg(4),
         'title' => t("'%name' content type", array('%name' => node_invoke(arg(4), 'node_name'))),
-        'callback' => 'node_types_configure',
-        'access' => user_access('administer nodes'),
         'type' => MENU_CALLBACK);
     }
   }
@@ -942,32 +940,34 @@ function node_admin_nodes() {
   return form($output, 'post', url('admin/node/action'));
 }
 
-function node_types() {
-  $header = array(t('Type'), t('Operations'));
+/**
+ * Menu callback; presents each node type configuration page.
+ */
+function node_types_configure($type = NULL) {
+  if (isset($type)) {
+    // Go to the listing page when we submit this form, system_settings_save() calls drupal_goto().
+    if ($_POST['op']) {
+      $_GET['q'] = 'admin/node/configure/types';
+    }
+    system_settings_save();
+
+    $group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 70, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
+    $group .= form_select(t('Minimum number of words'), 'minimum_'. $type .'_size', variable_get('minimum_'. $type .'_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array('%type' => node_invoke($type, 'node_name'))));
+    $output = form_group(t('Submission form'), $group);
+    $output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($type, 'settings')));
 
-  $rows = array();
-  foreach (node_list() as $type) {
-    $rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type));
+    print theme('page', system_settings_form($output));
   }
+  else {
+    $header = array(t('Type'), t('Operations'));
 
-  print theme('page', theme('table', $header, $rows));
-}
+    $rows = array();
+    foreach (node_list() as $type) {
+      $rows[] = array(node_invoke($type, 'node_name'), l(t('configure'), 'admin/node/configure/types/'. $type));
+    }
 
-function node_types_configure() {
-  // Go to the listing page when we submit this form, system_settings_save() calls drupal_goto().
-  if ($_POST['op']) {
-    $_GET['q'] = 'admin/node/configure/types';
+    print theme('page', theme('table', $header, $rows));
   }
-  system_settings_save();
-
-  $type = arg(4);
-
-  $group = form_textarea(t('Explanation or submission guidelines'), $type .'_help', variable_get($type .'_help', ''), 70, 5, t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_invoke($type, 'node_name'))));
-  $group .= form_select(t('Minimum number of words'), 'minimum_'. $type .'_size', variable_get('minimum_'. $type .'_size', 0), drupal_map_assoc(array(0, 10, 25, 50, 75, 100, 125, 150, 175, 200)), t('The minimum number of words a %type must be to be considered valid. This can be useful to rule out submissions that do not meet the site\'s standards, such as short test posts.', array('%type' => node_invoke($type, 'node_name'))));
-  $output = form_group(t('Submission form'), $group);
-  $output .= form_group(t('Workflow'), implode('', node_invoke_nodeapi($type, 'settings')));
-
-  print theme('page', system_settings_form($output));
 }
 
 /**
