From b524bbf2f3ff382587d8048fcd9d08f69d6d8fa3 Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 29 May 2010 02:26:01 +0000 Subject: Merged r6263:6271 to trunk. git-svn-id: http://code.elgg.org/elgg/trunk@6285 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/output.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engine/lib/output.php') diff --git a/engine/lib/output.php b/engine/lib/output.php index b2eb532ca..6e861e4ac 100644 --- a/engine/lib/output.php +++ b/engine/lib/output.php @@ -100,6 +100,10 @@ function autop($pee, $br = 1) { function elgg_make_excerpt($text, $num_chars = 250) { $text = trim(strip_tags($text)); $string_length = elgg_strlen($text); + + if ($string_length <= $num_chars) { + return $text; + } // handle cases $excerpt = elgg_substr($text, 0, $num_chars); -- cgit v1.2.3