? 361702-fapi-drupal-process-form-D7_0.patch
? node-filters.patch
? teaser-length.patch
? sites/default/files
? sites/default/settings.php
Index: includes/form.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.325
diff -u -p -r1.325 form.inc
--- includes/form.inc	28 Mar 2009 18:09:10 -0000	1.325
+++ includes/form.inc	30 Mar 2009 02:42:51 -0000
@@ -602,19 +602,14 @@ function drupal_prepare_form($form_id, &
   }
 
   $form += element_info('form');
-  $form += array('#tree' => FALSE, '#parents' => array());
+  $form += array('#tree' => FALSE, '#parents' => array(), '#validate' => array(), '#submit' => array());
 
-  if (!isset($form['#validate'])) {
-    if (drupal_function_exists($form_id . '_validate')) {
-      $form['#validate'] = array($form_id . '_validate');
-    }
+  // Add default validate and submit handlers so they can be altered.
+  if (drupal_function_exists($form_id . '_validate')) {
+    array_unshift($form['#validate'], $form_id . '_validate');
   }
-
-  if (!isset($form['#submit'])) {
-    if (drupal_function_exists($form_id . '_submit')) {
-      // We set submit here so that it can be altered.
-      $form['#submit'] = array($form_id . '_submit');
-    }
+  if (drupal_function_exists($form_id . '_submit')) {
+    array_unshift($form['#submit'], $form_id . '_submit');
   }
 
   // Normally, we would call drupal_alter($form_id, $form, $form_state).
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.43
diff -u -p -r1.43 node.admin.inc
--- modules/node/node.admin.inc	20 Mar 2009 08:14:34 -0000	1.43
+++ modules/node/node.admin.inc	30 Mar 2009 02:42:51 -0000
@@ -36,10 +36,12 @@ function node_configure() {
     '#description' => t('The default maximum number of posts to display per page on overview pages such as the main page.')
   );
   $form['teaser_length'] = array(
-    '#type' => 'select', '#title' => t('Length of trimmed posts'),
-    '#default_value' => 600,
-    '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_node_characters'),
-    '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 'Unlimited' . Note that this setting will only affect new or updated content and will not affect existing teasers.")
+    '#type' => 'textfield',
+    '#title' => t('Length of trimmed posts'),
+    '#default_value' => variable_get('teaser_length', 600),
+    '#size' => 4,
+    '#field_suffix' => t('characters'),
+    '#description' => t("The maximum number of characters used in the trimmed version of a post. Drupal will use this setting to determine at which offset long posts should be trimmed. The trimmed version of a post is typically used as a teaser when displaying the post on the main page, in XML feeds, etc. To disable teasers, set to 0. Note that this setting will only affect new or updated content and will not affect existing teasers.")
   );
 
   $form['node_preview'] = array(
@@ -54,10 +56,13 @@ function node_configure() {
 }
 
 /**
- * Helper function for teaser length choices.
+ * Validate the node configuration form.
  */
-function _node_characters($length) {
-  return ($length == 0) ? t('Unlimited') : format_plural($length, '1 character', '@count characters');
+function node_configure_validate($form, &$form_state) {
+  $value = $form_state['values']['teaser_length'];
+  if (!is_numeric($value) || $value < 0) {
+    form_set_error('teaser_length' , t('Teaser length must be a number greater than or equal to zero.'));
+  }
 }
 
 /**
Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.47
diff -u -p -r1.47 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	14 Mar 2009 20:13:27 -0000	1.47
+++ modules/taxonomy/taxonomy.admin.inc	30 Mar 2009 02:42:51 -0000
@@ -197,6 +197,10 @@ function taxonomy_form_vocabulary(&$form
  */
 function taxonomy_form_vocabulary_submit($form, &$form_state) {
   if ($form_state['clicked_button']['#value'] == t('Delete')) {
+    // Execute the vocabulary deletion.
+    if ($form_state['values']['delete'] === TRUE) {
+      return taxonomy_vocabulary_confirm_delete_submit($form, $form_state);
+    }
     // Rebuild the form to confirm vocabulary deletion.
     $form_state['rebuild'] = TRUE;
     $form_state['confirm_delete'] = TRUE;
@@ -852,7 +856,7 @@ function taxonomy_vocabulary_confirm_del
   $form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
   $form['vid'] = array('#type' => 'value', '#value' => $vid);
   $form['name'] = array('#type' => 'value', '#value' => $vocabulary->name);
-  $form['#submit'] = array('taxonomy_vocabulary_confirm_delete_submit');
+  $form['delete'] = array('#type' => 'value', '#value' => TRUE);
   return confirm_form($form,
                   t('Are you sure you want to delete the vocabulary %title?',
                   array('%title' => $vocabulary->name)),
