Index: modules/node/content_types.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.84
diff -u -r1.84 content_types.inc
--- modules/node/content_types.inc	29 Jul 2009 06:39:34 -0000	1.84
+++ modules/node/content_types.inc	31 Jul 2009 01:48:08 -0000
@@ -185,7 +185,7 @@
     '#type' => 'select', 
     '#title' => t('Length of trimmed posts'),
     '#default_value' => variable_get('teaser_length_' . $type->type, 600),
-    '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_node_characters'),
+    '#options' => drupal_map_assoc(array(-1, 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 content.")
   );
   $form['old_type'] = array(
@@ -236,7 +236,7 @@
  * Helper function for teaser length choices.
  */
 function _node_characters($length) {
-  return ($length == 0) ? t('Unlimited') : format_plural($length, '1 character', '@count characters');
+  return ($length == -1) ? t('Unlimited') : format_plural($length, '1 character', '@count characters');
 }
 
 /**
Index: modules/node/node.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.install,v
retrieving revision 1.25
diff -u -r1.25 node.install
--- modules/node/node.install	27 Jul 2009 19:26:31 -0000	1.25
+++ modules/node/node.install	31 Jul 2009 01:48:08 -0000
@@ -525,6 +525,18 @@
   return $ret;
 }
 
+/**
+ * Allow zero length trimmed summaries.
+ */
+function node_update_7007() {
+  $ret = array();
+  $teaser_length = variable_get('teaser_length', 600);
+  if ($teaser_length == 0) {
+    variable_set('teaser_length', -1);
+  }
+  return $ret;
+}
+
 
 
 /**
Index: modules/field/modules/text/text.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.module,v
retrieving revision 1.15
diff -u -r1.15 text.module
--- modules/field/modules/text/text.module	3 Jul 2009 18:19:29 -0000	1.15
+++ modules/field/modules/text/text.module	31 Jul 2009 01:48:08 -0000
@@ -354,12 +354,17 @@
     // the variable 'teaser_length' is preserved for backwards compatibility.
     $size = variable_get('teaser_length', 600);
   }
+  // To save time on trimming the summary, evaluate to see if an empty text summary
+  // is desired.
+  if ($size === 0) {
+    return '';
+  }
 
   // Find where the delimiter is in the body
   $delimiter = strpos($text, '<!--break-->');
 
-  // If the size is zero, and there is no delimiter, the entire body is the summary.
-  if ($size == 0 && $delimiter === FALSE) {
+  // If the size is unlimited, and there is no delimiter, the entire body is the summary.
+  if ($size == -1 && $delimiter === FALSE) {
     return $text;
   }
 
Index: modules/field/modules/text/text.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/modules/text/text.test,v
retrieving revision 1.9
diff -u -r1.9 text.test
--- modules/field/modules/text/text.test	27 Jul 2009 20:15:35 -0000	1.9
+++ modules/field/modules/text/text.test	31 Jul 2009 01:48:08 -0000
@@ -244,6 +244,7 @@
     // Using no text format:
     $expected = array(
       "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
+      "",
       "<",
       "<p",
       "<p>",
@@ -287,6 +288,7 @@
     $expected_lb = array(
       "<p>\nHi\n</p>\n<p>\nfolks\n<br />\n!\n</p>",
       "",
+      "",
       "<p />",
       "<p />",
       "<p />",
@@ -326,10 +328,11 @@
     );
 
     // Test text_summary() for different sizes.
-    for ($i = 0; $i <= 37; $i++) {
-      $this->callTextSummary($text, $expected[$i],    NULL, $i);
-      $this->callTextSummary($text, $expected_lb[$i], 1,    $i);
-      $this->callTextSummary($text, $expected_lb[$i], 2,    $i);
+    for ($i = 0; $i <= 38; $i++) {
+      // We use $i - 1 because a $size of -1 tests the unlimited length summaries.
+      $this->callTextSummary($text, $expected[$i],    NULL, $i - 1);
+      $this->callTextSummary($text, $expected_lb[$i], 1,    $i - 1);
+      $this->callTextSummary($text, $expected_lb[$i], 2,    $i - 1);
     }
   }
 
@@ -338,6 +341,6 @@
    */
   function callTextSummary($text, $expected, $format = NULL, $size = NULL) {
     $summary = text_summary($text, $format, $size);
-    $this->assertIdentical($summary, $expected, t('Generated summary "@summary" matches expected "@expected".', array('@summary' => $summary, '@expected' => $expected)));
+    $this->assertIdentical($summary, $expected, t('Text "@text" generated summary "@summary" matches expected "@expected".', array('@text' => $text, '@summary' => $summary, '@expected' => $expected)));
   }
 }
Index: modules/aggregator/aggregator.processor.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.processor.inc,v
retrieving revision 1.10
diff -u -r1.10 aggregator.processor.inc
--- modules/aggregator/aggregator.processor.inc	14 Jul 2009 10:42:11 -0000	1.10
+++ modules/aggregator/aggregator.processor.inc	31 Jul 2009 01:48:07 -0000
@@ -116,7 +116,7 @@
       '#type' => 'select',
       '#title' => t('Length of trimmed description'),
       '#default_value' => 600,
-      '#options' => drupal_map_assoc(array(0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_aggregator_characters'),
+      '#options' => drupal_map_assoc(array(-1, 0, 200, 400, 600, 800, 1000, 1200, 1400, 1600, 1800, 2000), '_aggregator_characters'),
       '#description' => t("The maximum number of characters used in the trimmed version of content.")
     );
 
@@ -127,7 +127,7 @@
  * Helper function for teaser length choices.
  */
 function _aggregator_characters($length) {
-  return ($length == 0) ? t('Unlimited') : format_plural($length, '1 character', '@count characters');
+  return ($length == -1) ? t('Unlimited') : format_plural($length, '1 character', '@count characters');
 }
 
 /**
