| 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 |
| 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; |