/[drupal]/drupal/modules/node.module
ViewVC logotype

Diff of /drupal/modules/node.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.641.2.23, Tue Dec 5 13:16:52 2006 UTC revision 1.641.2.24, Tue Dec 12 12:48:57 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: node.module,v 1.641.2.22 2006/12/05 13:07:44 killes Exp $  // $Id: node.module,v 1.641.2.23 2006/12/05 13:16:52 killes Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 160  function node_teaser($body, $format = NU Line 160  function node_teaser($body, $format = NU
160      return $body;      return $body;
161    }    }
162    
163      // If a valid delimiter has been specified, use it to chop off the teaser.
164      if ($delimiter !== FALSE) {
165        return substr($body, 0, $delimiter);
166      }
167    
168    // We check for the presence of the PHP evaluator filter in the current    // We check for the presence of the PHP evaluator filter in the current
169    // format. If the body contains PHP code, we do not split it up to prevent    // format. If the body contains PHP code, we do not split it up to prevent
170    // parse errors.    // parse errors.
171    if (isset($format)) {    if (isset($format)) {
172      $filters = filter_list_format($format);      $filters = filter_list_format($format);
173      if (isset($filters['filter/1']) && (strpos($body, '<?') !== FALSE) && (strpos($body, '<?') < $delimiter)) {      if (isset($filters['filter/1']) && strpos($body, '<?') !== FALSE) {
174        return $body;        return $body;
175      }      }
176    }    }
177    
   // If a valid delimiter has been specified, use it to chop of the teaser.  
   if ($delimiter !== FALSE) {  
     return substr($body, 0, $delimiter);  
   }  
   
178    // If we have a short body, the entire body is the teaser.    // If we have a short body, the entire body is the teaser.
179    if (strlen($body) < $size) {    if (strlen($body) < $size) {
180      return $body;      return $body;

Legend:
Removed from v.1.641.2.23  
changed lines
  Added in v.1.641.2.24

  ViewVC Help
Powered by ViewVC 1.1.2